diff options
author | Simon Charette <charette.s@gmail.com> | 2018-11-26 14:01:27 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-11-27 09:49:02 -0500 |
commit | 0f212db29d361ec6219b170198b7c94d0bb3f719 (patch) | |
tree | b4a1a93f3d5b725ed9d08896892f1a3f5e191ab7 /tests/admin_ordering | |
parent | 7f63b894c02effb09c15ab0b40d28b89553b8e37 (diff) | |
download | django-0f212db29d361ec6219b170198b7c94d0bb3f719.tar.gz |
Made reused RequestFactory instances class attributes.
Diffstat (limited to 'tests/admin_ordering')
-rw-r--r-- | tests/admin_ordering/tests.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/admin_ordering/tests.py b/tests/admin_ordering/tests.py index 026c76fe23..f68b64ae70 100644 --- a/tests/admin_ordering/tests.py +++ b/tests/admin_ordering/tests.py @@ -34,6 +34,7 @@ class TestAdminOrdering(TestCase): in ModelAdmin rather that ordering defined in the model's inner Meta class. """ + request_factory = RequestFactory() @classmethod def setUpTestData(cls): @@ -43,9 +44,6 @@ class TestAdminOrdering(TestCase): Band(name='Van Halen', bio='', rank=2), ]) - def setUp(self): - self.request_factory = RequestFactory() - def test_default_ordering(self): """ The default ordering should be by name, as specified in the inner Meta |