Ticket #18599: 18599-test.patch

File 18599-test.patch, 614 bytes (added by Bouke Haarsma, 11 years ago)
  • tests/generic_relations/tests.py

    diff --git a/tests/generic_relations/tests.py b/tests/generic_relations/tests.py
    index dde00cc..b3fb733 100644
    a b class ProxyRelatedModelTest(TestCase):  
    440440        newrel.bases = [base]
    441441        newrel = ConcreteRelatedModel.objects.get(pk=newrel.pk)
    442442        self.assertEqual(base, newrel.bases.get())
     443
     444
     445class TestInitializer(TestCase):
     446    def test_unsaved_related(self):
     447        bacon = Vegetable(name="Bacon")
     448        tag = TaggedItem(content_object=bacon)
     449        self.assertEqual(tag.content_object, bacon)
Back to Top