Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #20158: invalid code in queryset_pickle test models. #975

Merged
merged 1 commit into from
Mar 29, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/queryset_pickle/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 3 additions & 0 deletions tests/queryset_pickle/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down