Exemple #1
0
 def test_no_repeated_users_added(self):
     """
     Method checks that add user method actually adds a user
     to the database
     """
     _pword = "test"
     user = User(email='*****@*****.**', password=_pword)
     check = user.add_user()
     self.assertFalse(check, "User should already exist")
     self.assertFalse(
         user.id, "User doesnot contain id so he is not added to the db")
Exemple #2
0
 def test_add_user(self):
     """
     Method checks that add user method actually adds a user
     to the database
     """
     _pword = "test"
     user = User(email='*****@*****.**', password=_pword)
     check = user.add_user()
     self.assertTrue(check, "User should be added")
     self.assertTrue(
         user.id, "User doesnot contain id so he is not added to the db")