Skip to main content

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.

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

In your test:

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

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

https://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.

update the doc url - that section was removed after 1.5
Source Link
Chris Martin
  • 30.9k
  • 12
  • 83
  • 142

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

In your test:

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

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

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

In your test:

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

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

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

In your test:

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

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

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

In your test:

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

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

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.

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

In your test:

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

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

added 6 characters in body
Source Link
SystemParadox
  • 8.7k
  • 6
  • 52
  • 61
Loading
Source Link
SystemParadox
  • 8.7k
  • 6
  • 52
  • 61
Loading