def test_not_referenced(self):
        """
        Test to ensure that we observe the correct behaviour in the Django
        ORM.
        """
        f = models.ParentReference()
        f.name = 'foo'

        b = models.ChildReference()
        b.name = 'bar'

        f.save()
        b.foo = f
        b.save()
        f.bar = b
        f.save()

        self.addCleanup(f.delete)
        self.addCleanup(b.delete)

        self.assertEqual(f.id, 1)
        foo = models.ParentReference.objects.select_related().get(id=1)

        self.assertFalse(foo.bar.foo is foo)
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/PyAMF-0.6.1/pyamf/tests/adapters/test_django.py/ReferenceTestCase.test_not_referenced/original