Django Test Suite URL Coverage

后端 未结 2 441
感情败类
感情败类 2021-01-12 20:59

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 URL

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-12 21:35

    You should use django-coverage

    http://pypi.python.org/pypi/django-coverage

    It runs your test suite, and outputs nice html reports of what code is covered. I think this will be a more fail-safe and robust way to make sure that all your urls are covered.

提交回复
热议问题