Example #1
0
 def testRemoveUser(self):
     """
     test delete method in models
     """
     response = BeatMyGoalUser.create('test_user_view','test_email_view','test_password_view')
     test_user = response['user']
     test_user_userid = test_user.id
     response1 = BeatMyGoalUser.remove(test_user_userid)
     self.assertTrue(not response1['errors'])
     response2 = BeatMyGoalUser.getUserById(test_user_userid)
     self.assertTrue(response2['errors'])
Example #2
0
 def testRemoveUserWrong(self):
     """
     test delete method in models
     """
     response = BeatMyGoalUser.remove(-99)
     self.assertTrue(response['errors'])