Exemplo n.º 1
0
 def test_update_src(self):
     filename = "kep.jpg"
     from werkzeug.datastructures import FileStorage
     image = FileStorage(filename=filename)
     UserDAO.update_avatar("test", image)
     usr = UserDAO.get_user_with_name("test")
     self.assertEquals(usr.avatar_src, filename)
Exemplo n.º 2
0
 def test_update_src(self):
     filename = "kep.jpg"
     from werkzeug.datastructures import FileStorage
     image = FileStorage(filename=filename)
     UserDAO.update_avatar("test", image)
     usr = UserDAO.get_user_with_name("test")
     self.assertEquals(usr.avatar_src, filename)
Exemplo n.º 3
0
 def test_update_experience_by_user(self):
     UserDAO.update_experience("test", 4)
     usr = UserDAO.get_user_with_name("test")
     self.assertEquals(usr.experience_id, 4)
Exemplo n.º 4
0
 def test_update_email(self):
     UserDAO.update_email("test", "*****@*****.**")
     usr = UserDAO.get_user_with_name("test")
     self.assertEquals(usr.email, "*****@*****.**")
Exemplo n.º 5
0
 def test_update_pwd(self):
     print(UserDAO.update_pwd("test", "test1", "test1"))
     usr = UserDAO.get_user_with_name("test")
     self.assertEquals(True, check_password_hash(usr.password, "test1"))
Exemplo n.º 6
0
 def test_update_experience_by_user(self):
     UserDAO.update_experience("test", 4)
     usr = UserDAO.get_user_with_name("test")
     self.assertEquals(usr.experience_id, 4)
Exemplo n.º 7
0
 def test_update_email(self):
     UserDAO.update_email("test", "*****@*****.**")
     usr = UserDAO.get_user_with_name("test")
     self.assertEquals(usr.email, "*****@*****.**")
Exemplo n.º 8
0
 def test_update_pwd(self):
     print(UserDAO.update_pwd("test", "test1", "test1"))
     usr = UserDAO.get_user_with_name("test")
     self.assertEquals(True, check_password_hash(usr.password, "test1"))