예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 def test_make_a_sub_object(self):
     jack = JackRussell()
     self.assertEqual(jack.talk(), "Yap")
     jack.name = "jack"
     jack.age = 12
     self.db.put(jack)
예제 #4
0
 def test_make_a_sub_object(self):
     jack = JackRussell()
     self.assertEqual(jack.talk(), "Yap")
     jack.name = "jack"
     jack.age = 12
     self.db.put(jack)