From 0f72679fc81f0a4180ef9e90b9cdf423b0380ff1 Mon Sep 17 00:00:00 2001 From: "DESKTOP-DPA61F8\\Benedek" Date: Sun, 18 Apr 2021 16:30:01 +0200 Subject: [PATCH] Typing mismatch --- server/authentication.py | 2 +- server/authentication_test.py | 2 +- server/config/config.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 server/config/config.txt diff --git a/server/authentication.py b/server/authentication.py index 9ddc19b..92095ce 100644 --- a/server/authentication.py +++ b/server/authentication.py @@ -73,7 +73,7 @@ class Authetication: user = { 'username': username, 'password': bcrypt_hash.decode('utf-8'), - 'homeDir': data['index'] + 1 + 'homeDir': str(data['index'] + 1) } data['index'] = data['index'] + 1 diff --git a/server/authentication_test.py b/server/authentication_test.py index b6254f3..ffcf26b 100644 --- a/server/authentication_test.py +++ b/server/authentication_test.py @@ -33,7 +33,7 @@ def testAuth(username: str, password: str): auth.saveUser(username, password) homeDir = auth.login(username, password) - if homeDir == 1: + if homeDir == '1': test_logger.info('TEST 1 --> Authentication test with VALID :: PASSED') else: test_logger.info('TEST 1 --> Authentication test with VALID :: FAILED') diff --git a/server/config/config.txt b/server/config/config.txt new file mode 100644 index 0000000..649b483 --- /dev/null +++ b/server/config/config.txt @@ -0,0 +1 @@ +{"index": 1, "user": [{"username": "Di\u00f3sbejglia", "password": "$2a$12$Gx9p..zJuM8uXdktzlC3vuGBSSpw1/lBCGSIK5d6cAFyKnfoPMPo6", "homeDir": "1"}]} \ No newline at end of file