Example #1
0
 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)
Example #2
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)
Example #3
0
 def testReadEntity(self):
     base = Base()
     base.name = 'Base name'
     base.put()
     baseInserted = Base.all().fetch(1)[0]
     self.assertEqual(base.name, baseInserted.name)
Example #4
0
 def testCreatetentity(self):
     base = Base()
     base.name = 'Base name'
     base.put()
     self.assertEqual(1, len(Base.all().fetch(1)))