'Objects ids can be referenced before they are
defined in the serialization data.'

@skipUnlessDBFeature('supports_forward_references')
def test_forward_refs(self):

    with transaction.atomic():
        objs = serializers.deserialize(self.serializer_name, self.fwd_ref_str)
        with connection.constraint_checks_disabled():
            for obj in objs:
                obj.save()
    for model_cls in (Category, Author, Article):
        self.assertEqual(model_cls.objects.all().count(), 1)
    art_obj = Article.objects.all()[0]
    self.assertEqual(art_obj.categories.all().count(), 1)
    self.assertEqual(art_obj.author.name, 'Agnes')
