Skip to content

Commit 6f0ace9

Browse files
authored
Update tests.py
1 parent f25af5e commit 6f0ace9

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

usefulib/tests.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,13 @@ def test_external_verbose_output(self):
7676
self.assertEqual(f.read(), "# Logged by usefulibs.external_verbose_output()\n\nTest Data\n1 2 3\na b c")
7777
def test_get_hash(self):
7878
""" @MKM12345 """
79-
input_password = "password123"
80-
stored_hash = _usefulibs.get_hash(input_password)
81-
82-
user_input = input("Enter a password: ")
83-
hashed_input = _usefulibs.get_hash(user_input)
84-
85-
if hashed_input == stored_hash:
86-
print("Correct")
79+
password = "myPassword123"
80+
password_hash = get_hash(password)
81+
user_input = input("Please enter your password: ")
82+
if get_hash(user_input) == password_hash:
83+
print("Welcome!")
8784
else:
88-
print("Wrong")
85+
print("Incorrect password")
8986

9087

9188
if __name__ == "__main__":

0 commit comments

Comments
 (0)