import pickle
import datetime

from django.test import TestCase

from models import Group, Event, Happening


class PickleabilityTestCase(TestCase):
    def assert_pickles(self, qs):
        self.assertEqual(list(pickle.loads(pickle.dumps(qs))), list(qs))

    def test_related_field(self):
        g = Group.objects.create(name="Ponies Who Own Maybachs")
        self.assert_pickles(Event.objects.filter(group=g.id))

    def test_datetime_callable_default_all(self):
        self.assert_pickles(Happening.objects.all())

    def test_datetime_callable_default_filter(self):
        self.assert_pickles(Happening.objects.filter(when=datetime.datetime.now()))

    def test_lambda_as_default(self):
        self.assert_pickles(Happening.objects.filter(name="test"))

    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))

@@ -1079,33 +1079,33 @@
 ts.filter(number
-2
+3
 =1))%0A%0A    def te
@@ -1181,30 +1181,30 @@
 ng.objects.filter(number
-2
+4
 =1))%0A

Tweak the last two tests from r13013 to test what they are intended to test instead of repeating 3rd to last test.