def test_with_foreignkey(self):
    results = self.foo_foreignkey_results()
    with transaction.atomic():
        self.create_foo_objects()
        FooBarModel.objects.create(foobar1=FooModel.objects.get(pk=1), foobar2='call me snake', foobar3=24.45)
        FooBarModel.objects.create(foobar2='call me tiger', foobar3=23.22)
    for i in range(1, 3):
        self._test_equality(FooBarModel, pk=i, result=results[i])
def test_with_foreignkey(self):
    results = self.foo_foreignkey_results()
    with transaction.atomic():
        self.create_foo_objects()
        FooBarModel.objects.create(foobar1=FooModel.objects.get(pk=1), foobar2='call me snake', foobar3=24.45)
        FooBarModel.objects.create(foobar2='call me tiger', foobar3=23.22)
    for i in range(1, 3):
        self._test_equality(FooBarModel, pk=i, result=results[i])