Beispiel #1
0
 def test_get_user_by_email(self, mock_user):
     u1 = User("*****@*****.**", "pwd1", "Admin")
     mock_user.query.filter_by(User.email).first.return_value = [u1]
     #print (User.get_user_by_email("mma")[0].get_role())
     #print (u1.email)
     self.assertEqual(u1, User.get_user_by_email("mail123")[0])