def testReadEntity(self): user = UserAccount(name="Cherny") user.email = '*****@*****.**' user.googleToken = '12345678901234567890' user.facebookToken = '12345678901234567890' user.flickrToken = '12345678901234567890' user.password = '******' user.address1 = 'somewhere in Venezuela' user.address2 = 'somewhere in San Cristobal' user.phone1 = '+582763423450' user.phone2 = '+584129381790' user.documentID = 15106061 user.put() userInserted = UserAccount.all().fetch(1)[0] self.assertEqual(user.name, userInserted.name) self.assertEqual(user.email, userInserted.email) self.assertEqual(user.googleToken, userInserted.googleToken) self.assertEqual(user.facebookToken, userInserted.facebookToken) self.assertEqual(user.flickrToken, userInserted.flickrToken) self.assertEqual(user.password, userInserted.password) self.assertEqual(user.address1, userInserted.address1) self.assertEqual(user.address2, userInserted.address2) self.assertEqual(user.phone1, userInserted.phone1) self.assertEqual(user.phone2, userInserted.phone2) self.assertEqual(user.documentID, userInserted.documentID)
def testCreatetentity(self): user = UserAccount(name="Cherny") user.email = '*****@*****.**' user.googleToken = '12345678901234567890' user.facebookToken = '12345678901234567890' user.flickrToken = '12345678901234567890' user.password = '******' user.address1 = 'somewhere in Venezuela' user.address2 = 'somewhere in San Cristobal' user.phone1 = '+582763423450' user.phone2 = '+584129381790' user.documentID = 15106061 user.put() self.assertEqual(1, len(UserAccount.all().fetch(1)))
def testCreatetentity(self): user = UserAccount(name="Cherny") album = Album() album.name = 'Album name' album.userAcount = user.put() album.maxPages = 9 album.PDFUrl = 'http://whatever' album.size = [10, 15] album.put() self.assertEqual(1, len(Album.all().fetch(1)))
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)))
def testReadEntity(self): user = UserAccount(name="Cherny") page = Page() page.name = 'Page name' page.userAcount = user.put() page.maxPages = 9 page.PDFUrl = 'http://whatever' page.size = [10, 15] page.put() pageInserted = Page.all().fetch(1)[0] self.assertEqual(page.name, pageInserted.name)
def testReadEntity(self): user = UserAccount(name="Cherny") album = Album() album.name = 'Album name' album.userAcount = user.put() album.maxPages = 9 album.PDFUrl = 'http://whatever' album.size = [10, 15] album.put() albumInserted = Album.all().fetch(1)[0] self.assertEqual(album.name, albumInserted.name)
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)
def testDeleteEntity(self): user = UserAccount(name="Cherny") page = Page() page.name = 'Page name' page.userAcount = user.put() page.maxPages = 9 page.PDFUrl = 'http://whatever' page.size = [10, 15] page.put() pageInserted = Page.all().fetch(1)[0] pageInserted.name = 'Another page name' page.put() pageInserted = Page.all().fetch(1)[0] pageInserted.delete() self.assertEqual(len(Page.all().fetch(1)), 0)
def testDeleteEntity(self): user = UserAccount(name="ssss4545454545Cherny") album = Album() album.name = 'Album name' album.userAcount = user.put() album.maxPages = 9 album.PDFUrl = 'http://whatever' album.size = [10, 15] album.put() albumInserted = Album.all().fetch(1)[0] albumInserted.name = 'Another album name' album.put() albumInserted = Album.all().fetch(1)[0] albumInserted.delete() self.assertEqual(len(Album.all().fetch(1)), 0)
def testDeleteEntity(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] imageTemplateInserted.name = 'Another imageTemplate name' imageTemplate.put() imageTemplateInserted = ImageTemplate.all().fetch(1)[0] imageTemplateInserted.delete() self.assertEqual(len(ImageTemplate.all().fetch(1)), 0)