I’m looking to do some tests and I’m not really familiar with the URLResolver quite yet but I’d like to solve this issue quickly.
In a TestCase, I’d like to add a URL to the resolver so that I can then use Client.get('/url/') and keep it separate from urls.py.
https://docs.djangoproject.com/en/2.1/topics/testing/tools/#urlconf-configuration
In your test:
This will use
myapp/test_urls.pyas theROOT_URLCONF.