Example #1
0
 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)
Example #2
0
 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)))