'The main test here is that the all the models can be created without
any database errors. We can also do some more simple insertion and
lookup tests whilst we\'re here to show that the second of models do
refer to the tables from the first set.'

def test_simple(self):

    a = A01.objects.create(f_a='foo', f_b=42)
    B01.objects.create(fk_a=a, f_a='fred', f_b=1729)
    c = C01.objects.create(f_a='barney', f_b=1)
    c.mm_a = [a]
    a2 = A02.objects.all()[0]
    self.assertTrue(isinstance(a2, A02))
    self.assertEqual(a2.f_a, 'foo')
    b2 = B02.objects.all()[0]
    self.assertTrue(isinstance(b2, B02))
    self.assertEqual(b2.f_a, 'fred')
    self.assertTrue(isinstance(b2.fk_a, A02))
    self.assertEqual(b2.fk_a.f_a, 'foo')
    self.assertEqual(list(C02.objects.filter(f_a=None)), [])
    resp = list(C02.objects.filter(mm_a=a.id))
    self.assertEqual(len(resp), 1)
    self.assertTrue(isinstance(resp[0], C02))
    self.assertEqual(resp[0].f_a, 'barney')
