diff --git a/pass.py b/auth.py similarity index 100% rename from pass.py rename to auth.py diff --git a/test_auth.py b/test_auth.py new file mode 100644 index 0000000..b2ef1d1 --- /dev/null +++ b/test_auth.py @@ -0,0 +1,88 @@ +import auth +import pathlib +import pickle +import tempfile + +# global pathname thingies +PWDB_FLNAME = pathlib.Path('pwdb.pkl') +pwdb_path = tempfile.gettempdir() / PWDB_FLNAME + +# user data that is correct +db_right = list() +db_right.append(('daniel', 'vargas', '=2od%]1*9Q', 9966)) +db_right.append(('nadine', 'heere', 'j=U]V.n`l\\', 10976)) +db_right.append(('mayar', 'ali', 'PJM0~RD*|&', 6986)) +db_right.append(('marc', 'vischer', 'nL*E~T&az1', 13112)) +db_right.append(('pooja', 'subramaniam', '%9<:%fSN$}', 18453)) + + +# user data that is incorrect +db_wrong = list() +db_wrong.append(('joel', 'afreth', 'c:d{