Skip to content

Commit d37606c

Browse files
committed
fix: manage users illegal test pw fix
1 parent 54fd3ee commit d37606c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/unit/test_manage_users.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
},
2020
}
2121
)
22+
PASSWORD = 'mock_password_123'
2223

2324

2425
class Prompt(NamedTuple):
@@ -28,7 +29,7 @@ class Prompt(NamedTuple):
2829

2930
@pytest.fixture
3031
def prompt(monkeypatch):
31-
monkeypatch.setattr('getpass.getpass', lambda _: 'mock_password')
32+
monkeypatch.setattr('getpass.getpass', lambda _: PASSWORD)
3233
with create_pipe_input() as pipe:
3334
session = PromptSession(
3435
input=pipe,
@@ -120,4 +121,4 @@ def test_password_is_hashed(prompt):
120121
start_user_management(test_app, store, db, prompt.session)
121122
with test_app.app_context():
122123
user = store.find_user(email='test_user')
123-
assert user.password != 'mock_password'
124+
assert user.password != PASSWORD

0 commit comments

Comments
 (0)