1
0
mirror of https://github.com/django/django.git synced 2024-12-25 10:35:48 +00:00

[1.8.x] Added an import to docs/topics/testing/advanced.txt example.

Backport of 32b67b3fd1 from master
This commit is contained in:
Tim Graham 2015-02-17 13:53:20 -05:00
parent a1fa0135ec
commit e4df10668c

View File

@ -40,6 +40,8 @@ The following is a simple unit test using the request factory::
from django.contrib.auth.models import AnonymousUser, User from django.contrib.auth.models import AnonymousUser, User
from django.test import TestCase, RequestFactory from django.test import TestCase, RequestFactory
from .views import my_view
class SimpleTest(TestCase): class SimpleTest(TestCase):
def setUp(self): def setUp(self):
# Every test needs access to the request factory. # Every test needs access to the request factory.