From 882ab0af80f1eb369a6457534030f55899e6fdb7 Mon Sep 17 00:00:00 2001 From: Jonas Betzendahl Date: Mon, 1 Nov 2021 12:05:10 +0100 Subject: [PATCH] fix remnant errors in tests and code --- nativeauthenticator/nativeauthenticator.py | 2 +- nativeauthenticator/tests/test_authenticator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nativeauthenticator/nativeauthenticator.py b/nativeauthenticator/nativeauthenticator.py index 9d28352..5c30e01 100644 --- a/nativeauthenticator/nativeauthenticator.py +++ b/nativeauthenticator/nativeauthenticator.py @@ -429,7 +429,7 @@ def add_data_from_firstuse(self): with dbm.open(self.firstuse_db_path, "c", 0o600) as db: for user in db.keys(): password = db[user].decode() - new_user = self.create_user(user.decode(), password, password) + new_user = self.create_user(user.decode(), password) if not new_user: error = ( f"User {user} was not created. Check password " diff --git a/nativeauthenticator/tests/test_authenticator.py b/nativeauthenticator/tests/test_authenticator.py index 710018c..337057f 100644 --- a/nativeauthenticator/tests/test_authenticator.py +++ b/nativeauthenticator/tests/test_authenticator.py @@ -154,7 +154,7 @@ async def test_no_change_to_bad_password(tmpcwd, app): auth.check_common_password = True auth.minimum_password_length = 8 - auth.create_user("johnsnow", "ironwood", "ironwood") + auth.create_user("johnsnow", "ironwood") # Can't change password of nonexistent users. assert auth.change_password("samwelltarly", "palanquin") is None