mirror of
https://github.com/django/django.git
synced 2025-12-04 00:55:36 +00:00
parent
7f264e02f4
commit
cfcf4b3605
123 changed files with 212 additions and 161 deletions
|
|
@ -37,7 +37,7 @@ Example
|
|||
|
||||
The following is a simple unit test using the request factory::
|
||||
|
||||
from django.utils import unittest
|
||||
import unittest
|
||||
from django.test.client import RequestFactory
|
||||
|
||||
class SimpleTest(unittest.TestCase):
|
||||
|
|
|
|||
|
|
@ -800,7 +800,7 @@ Example
|
|||
|
||||
The following is a simple unit test using the test client::
|
||||
|
||||
from django.utils import unittest
|
||||
import unittest
|
||||
from django.test.client import Client
|
||||
|
||||
class SimpleTest(unittest.TestCase):
|
||||
|
|
@ -1143,7 +1143,7 @@ worry about state (such as cookies) carrying over from one test to another.
|
|||
|
||||
This means, instead of instantiating a ``Client`` in each test::
|
||||
|
||||
from django.utils import unittest
|
||||
import unittest
|
||||
from django.test.client import Client
|
||||
|
||||
class SimpleTest(unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue