https://docs.djangoproject.com/en/1.5/topics/testing/overview/#urlconf-configurationhttps://docs.djangoproject.com/en/2.1/topics/testing/tools/#urlconf-configuration
In your test:
class TestMyViews(TestCase): urls = 'myapp.test_urls' This will use myapp/test_urls.py as the ROOT_URLCONF.