def testDeleteEntity(self): base = Base() base.name = 'Base name' base.put() baseInserted = Base.all().fetch(1)[0] baseInserted.delete() self.assertEqual(len(Base.all().fetch(1)), 0)
def testUpdateEntity(self): base = Base() base.name = 'Base name' base.put() baseInserted = Base.all().fetch(1)[0] baseInserted.name = 'Another base name' baseInserted.put() baseUpdated = Base.all().fetch(1)[0] self.assertEqual(baseInserted.name , baseUpdated.name)
def testReadEntity(self): base = Base() base.name = 'Base name' base.put() baseInserted = Base.all().fetch(1)[0] self.assertEqual(base.name, baseInserted.name)
def testCreatetentity(self): base = Base() base.name = 'Base name' base.put() self.assertEqual(1, len(Base.all().fetch(1)))