mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #13328 -- Ensured that querysets on models with callable defaults can be pickled. No, really this time. Thanks to Alex for his help brainstorming the solution.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e8eac32901
commit
3fb57d47bd
8 changed files with 64 additions and 36 deletions
|
@ -23,5 +23,14 @@ class PickleabilityTestCase(TestCase):
|
|||
def test_lambda_as_default(self):
|
||||
self.assert_pickles(Happening.objects.filter(name="test"))
|
||||
|
||||
def test_callable_as_default(self):
|
||||
self.assert_pickles(Happening.objects.filter(number=1))
|
||||
def test_standalone_method_as_default(self):
|
||||
self.assert_pickles(Happening.objects.filter(number1=1))
|
||||
|
||||
def test_staticmethod_as_default(self):
|
||||
self.assert_pickles(Happening.objects.filter(number2=1))
|
||||
|
||||
def test_classmethod_as_default(self):
|
||||
self.assert_pickles(Happening.objects.filter(number2=1))
|
||||
|
||||
def test_membermethod_as_default(self):
|
||||
self.assert_pickles(Happening.objects.filter(number2=1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue