Skip to content

Commit

Permalink
Add integration test activation long password
Browse files Browse the repository at this point in the history
  • Loading branch information
stsnel committed Oct 19, 2023
1 parent a6cbc78 commit 441723f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion yoda_eus/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def csrf_exempt(f):
with app.app_context():
now = datetime.now()
hashed_password = bcrypt.hashpw("Test123456!!!".encode("utf-8"), bcrypt.gensalt())
for n in range(1, 5):
for n in range(1, 6):
unactivated_user = User(username="unactivateduser" + str(n),
creator_time=now,
creator_user="creator",
Expand Down
4 changes: 4 additions & 0 deletions yoda_eus/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ def test_activate_and_check_auth_interpunction2(self, test_client):
def test_activate_and_check_auth_interpunction3(self, test_client):
self._test_activate_and_check_auth(test_client, "Test1;:\"',./<>?", "unactivateduser4", "goodhash4")

def test_activate_and_check_auth_long_password(self, test_client):
long_password = "T1_" + "a" * 996
self._test_activate_and_check_auth(test_client, long_password, "unactivateduser5", "goodhash5")

def test_auth_check_user_does_not_exist(self, test_client):
bad_credentials = "userdoesnotexist:somepassword"
bad_credentials_base64 = base64.b64encode(bad_credentials.encode('utf-8')).decode('utf-8')
Expand Down

0 comments on commit 441723f

Please sign in to comment.