diff --git a/teraserver/python/tests/modules/FlaskModule/API/user/test_UserLogin.py b/teraserver/python/tests/modules/FlaskModule/API/user/test_UserLogin.py index 04c736f2..76fb490b 100644 --- a/teraserver/python/tests/modules/FlaskModule/API/user/test_UserLogin.py +++ b/teraserver/python/tests/modules/FlaskModule/API/user/test_UserLogin.py @@ -9,8 +9,8 @@ def setUp(self): super().setUp() # Create users with 2fa enabled with self._flask_app.app_context(): - self.user1: dict = self._create_2fa_enabled_user('test_user_2fa_1', 'password', set_secret=True) - self.user2: dict = self._create_2fa_enabled_user('test_user_2fa_2', 'password', set_secret=False) + self.user1: dict = self._create_2fa_enabled_user('test_user_2fa_1', 'Password12345!', set_secret=True) + self.user2: dict = self._create_2fa_enabled_user('test_user_2fa_2', 'Password12345!', set_secret=False) def tearDown(self): # Delete users with 2fa enabled @@ -102,7 +102,7 @@ def test_get_endpoint_login_user1_2fa_already_setup(self): with self._flask_app.app_context(): # Login should redirect to 2fa verification - response = self._get_with_user_http_auth(self.test_client, 'test_user_2fa_1', 'password') + response = self._get_with_user_http_auth(self.test_client, 'test_user_2fa_1', 'Password12345!') self.assertEqual(200, response.status_code) self.assertTrue('redirect_url' in response.json) self.assertFalse('login_setup_2fa' in response.json['redirect_url']) @@ -117,7 +117,7 @@ def test_get_endpoint_login_user2_2fa_not_setup(self): with self._flask_app.app_context(): # Login should redirect to 2fa verification - response = self._get_with_user_http_auth(self.test_client, 'test_user_2fa_2', 'password') + response = self._get_with_user_http_auth(self.test_client, 'test_user_2fa_2', 'Password12345!') self.assertEqual(200, response.status_code) self.assertTrue('redirect_url' in response.json) self.assertTrue('login_setup_2fa' in response.json['redirect_url']) diff --git a/teraserver/python/tests/modules/FlaskModule/API/user/test_UserLoginSetup2FA.py b/teraserver/python/tests/modules/FlaskModule/API/user/test_UserLoginSetup2FA.py index 793551c0..f9ec2c9a 100644 --- a/teraserver/python/tests/modules/FlaskModule/API/user/test_UserLoginSetup2FA.py +++ b/teraserver/python/tests/modules/FlaskModule/API/user/test_UserLoginSetup2FA.py @@ -10,8 +10,8 @@ def setUp(self): super().setUp() # Create users with 2fa enabled with self._flask_app.app_context(): - self.user1: dict = self._create_2fa_enabled_user('test_user_2fa_1', 'password', set_secret=True) - self.user2: dict = self._create_2fa_enabled_user('test_user_2fa_2', 'password', set_secret=False) + self.user1: dict = self._create_2fa_enabled_user('test_user_2fa_1', 'Password12345!', set_secret=True) + self.user2: dict = self._create_2fa_enabled_user('test_user_2fa_2', 'Password12345!', set_secret=False) def tearDown(self): # Delete users with 2fa enabled @@ -79,7 +79,7 @@ def test_get_endpoint_login_user1_2fa_already_setup(self): with self._flask_app.app_context(): # Fisrt login to create session - response = self._login_user('test_user_2fa_1', 'password') + response = self._login_user('test_user_2fa_1', 'Password12345!') self.assertEqual(200, response.status_code) self.assertTrue('redirect_url' in response.json) self.assertFalse('login_setup_2fa' in response.json['redirect_url']) @@ -92,7 +92,7 @@ def test_get_endpoint_login_user2_http_auth_should_work_but_and_modify_user_afte with self._flask_app.app_context(): # First login to create session - response = self._login_user('test_user_2fa_2', 'password') + response = self._login_user('test_user_2fa_2', 'Password12345!') self.assertEqual(200, response.status_code) self.assertTrue('redirect_url' in response.json) self.assertTrue('login_setup_2fa' in response.json['redirect_url']) @@ -133,7 +133,7 @@ def test_get_endpoint_login_user2_http_auth_should_fail_after_post_with_wrong_co with self._flask_app.app_context(): # First login to create session - response = self._login_user('test_user_2fa_2', 'password') + response = self._login_user('test_user_2fa_2', 'Password12345!') self.assertEqual(200, response.status_code) self.assertTrue('redirect_url' in response.json) self.assertTrue('login_setup_2fa' in response.json['redirect_url']) @@ -160,7 +160,7 @@ def test_get_endpoint_login_user2_http_auth_should_fail_after_post_with_wrong_se with self._flask_app.app_context(): # First login to create session - response = self._login_user('test_user_2fa_2', 'password') + response = self._login_user('test_user_2fa_2', 'Password12345!') self.assertEqual(200, response.status_code) self.assertTrue('redirect_url' in response.json) self.assertTrue('login_setup_2fa' in response.json['redirect_url'])