I’d like to make sure that my Django test suite covers all URLs listed in my URL configuration. Is there a way to compare the list in the URL configuration to a list of URLs that have been hit during a test suite?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I was able to come up with a solution by defining a custom test suite runner that records the URLs being accessed and compares it to the list of configured URLs.
Here’s the code: http://djangosnippets.org/snippets/2694/