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?
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With