diff options
| author | Loic Bistuer <loic.bistuer@sixmedia.com> | 2014-01-22 16:53:41 +0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-01-28 08:17:01 -0500 |
| commit | 3e4dc5ecf25aa2b38eed73472899f0de5a319c04 (patch) | |
| tree | 8623159df0c14a836a2207df8f475a38e6277e05 /tests/queryset_pickle | |
| parent | 88a2d39159872f6a7fced1bae591550650fd7f38 (diff) | |
Fixed #21853 -- Fixed Manager.__module__ to properly return 'django.db.models.manager'.
The combination of BaseManager.from_queryset() and RenameMethodsBase results in
Manager.__module__ having the wrong value. This can be an issue when trying to
pickle the Manager class.
Diffstat (limited to 'tests/queryset_pickle')
| -rw-r--r-- | tests/queryset_pickle/tests.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/queryset_pickle/tests.py b/tests/queryset_pickle/tests.py index 077ac6f59c..45b75dd0e9 100644 --- a/tests/queryset_pickle/tests.py +++ b/tests/queryset_pickle/tests.py @@ -50,6 +50,9 @@ class PickleabilityTestCase(TestCase): self.assertEqual(original.__class__, unpickled.__class__) self.assertEqual(original.args, unpickled.args) + def test_manager_pickle(self): + pickle.loads(pickle.dumps(Happening.objects)) + def test_model_pickle(self): """ Test that a model not defined on module level is pickleable. |
