Пример #1
0
 def testCreatetentity(self):
     user = UserAccount(name="Cherny")
     image = Image()
     image.name = 'Image name'
     image.userAccount = user.put()
     image.picasaID = 'http://whatever'
     image.ThumbnaiUrl = 'http://whatever'
     image.size = [10, 15]
     image.css = '{rule : property;}'
     image.put()
     self.assertEqual(1, len(Image.all().fetch(1)))
Пример #2
0
 def testReadEntity(self):
     user = UserAccount(name="Cherny")
     image = Image()
     image.name = 'Image name'
     image.userAccount = user.put()
     image.picasaID = 'http://whatever'
     image.ThumbnaiUrl = 'http://whatever'
     image.size = [10, 15]
     image.css = '{rule : property;}'
     image.put()
     imageInserted = Image.all().fetch(1)[0]
     self.assertEqual(image.name, imageInserted.name)