def test_refs_with_inheritance(self): paul = Person(name="paul") paul.save(self.db) jack = JackRussell() jack.owner_id = paul.key jack.name = "jack" jack.save(self.db) self.assertEqual(list(paul.dogs)[0], jack)
def test_make_a_sub_object(self): jack = JackRussell() self.assertEqual(jack.talk(), "Yap") jack.name = "jack" jack.age = 12 self.db.put(jack)