summaryrefslogtreecommitdiff
path: root/tests/basic
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basic')
-rw-r--r--tests/basic/tests.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/basic/tests.py b/tests/basic/tests.py
index b3bb4d02cc..909f3049b9 100644
--- a/tests/basic/tests.py
+++ b/tests/basic/tests.py
@@ -372,15 +372,16 @@ class ModelTest(TestCase):
class ModelLookupTest(TestCase):
- def setUp(self):
+ @classmethod
+ def setUpTestData(cls):
# Create an Article.
- self.a = Article(
+ cls.a = Article(
id=None,
headline='Swallow programs in Python',
pub_date=datetime(2005, 7, 28),
)
# Save it into the database. You have to call save() explicitly.
- self.a.save()
+ cls.a.save()
def test_all_lookup(self):
# Change values by changing the attributes, then calling save().