summaryrefslogtreecommitdiff
path: root/django/test/__init__.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-10-12 23:37:47 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-10-12 23:37:47 +0000
commiteec45e8b710b97201db106a6460fe051f8917833 (patch)
treed2b3d43a5ead4b70d3b9efda390ca0d6624b287f /django/test/__init__.py
parent120aae2209a50641f51e1f6bc4fe383fb42757fb (diff)
Fixed #9002 -- Added a RequestFactory. This allows you to create request instances so you can unit test views as standalone functions. Thanks to Simon Willison for the suggestion and snippet on which this patch was originally based.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14191 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/test/__init__.py')
-rw-r--r--django/test/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/test/__init__.py b/django/test/__init__.py
index b3198fcf88..68aea9aa49 100644
--- a/django/test/__init__.py
+++ b/django/test/__init__.py
@@ -2,6 +2,6 @@
Django Unit Test and Doctest framework.
"""
-from django.test.client import Client
+from django.test.client import Client, RequestFactory
from django.test.testcases import TestCase, TransactionTestCase, skipIfDBFeature, skipUnlessDBFeature
from django.test.utils import Approximate