https://docs.djangoproject.com/en/dev/topics/testing/#urlconf-configuration

In your test:
 
 class TestMyViews(TestCase):
 urls = 'myapp.test_urls'

This will use `myapp/test_urls.py` as the `ROOT_URLCONF`.