Browse files

Fix #20158: invalid code in queryset_pickle test models.

  • Loading branch information...
1 parent 738eef0 commit a40746b1cbc912119f9f873614017953b17a4d7a @bmispelon bmispelon committed Mar 29, 2013
Showing with 6 additions and 3 deletions.
  1. +3 −3 tests/queryset_pickle/models.py
  2. +3 −0 tests/queryset_pickle/tests.py
View
6 tests/queryset_pickle/models.py
@@ -6,16 +6,16 @@
from django.utils.translation import ugettext_lazy as _
-def standalone_number(self):
+def standalone_number():
return 1
class Numbers(object):
@staticmethod
- def get_static_number(self):
+ def get_static_number():
return 2
@classmethod
- def get_class_number(self):
+ def get_class_number(cls):
return 3
def get_member_number(self):
View
3 tests/queryset_pickle/tests.py
@@ -9,6 +9,9 @@
class PickleabilityTestCase(TestCase):
+ def setUp(self):
+ Happening.objects.create() # make sure the defaults are working (#20158)
+
def assert_pickles(self, qs):
self.assertEqual(list(pickle.loads(pickle.dumps(qs))), list(qs))

0 comments on commit a40746b

Please sign in to comment.