def testCreatetentity(self): user = UserAccount(name="Cherny") imageTemplate = ImageTemplate() imageTemplate.name = 'ImageTemplate name' imageTemplate.userAccount = user.put() imageTemplate.picasaID = 'http://whatever' imageTemplate.ThumbnaiUrl = 'http://whatever' imageTemplate.size = [10, 15] imageTemplate.css = '{rule : property;}' imageTemplate.put() self.assertEqual(1, len(ImageTemplate.all().fetch(1)))
def testReadEntity(self): user = UserAccount(name="Cherny") imageTemplate = ImageTemplate() imageTemplate.name = 'ImageTemplate name' imageTemplate.userAccount = user.put() imageTemplate.picasaID = 'http://whatever' imageTemplate.ThumbnaiUrl = 'http://whatever' imageTemplate.size = [10, 15] imageTemplate.css = '{rule : property;}' imageTemplate.put() imageTemplateInserted = ImageTemplate.all().fetch(1)[0] self.assertEqual(imageTemplate.name, imageTemplateInserted.name)