Typing mismatch

This commit is contained in:
DESKTOP-DPA61F8\Benedek 2021-04-18 16:30:01 +02:00
parent 55026aa626
commit 0f72679fc8
3 changed files with 3 additions and 2 deletions

View File

@ -73,7 +73,7 @@ class Authetication:
user = { user = {
'username': username, 'username': username,
'password': bcrypt_hash.decode('utf-8'), 'password': bcrypt_hash.decode('utf-8'),
'homeDir': data['index'] + 1 'homeDir': str(data['index'] + 1)
} }
data['index'] = data['index'] + 1 data['index'] = data['index'] + 1

View File

@ -33,7 +33,7 @@ def testAuth(username: str, password: str):
auth.saveUser(username, password) auth.saveUser(username, password)
homeDir = auth.login(username, password) homeDir = auth.login(username, password)
if homeDir == 1: if homeDir == '1':
test_logger.info('TEST 1 --> Authentication test with VALID :: PASSED') test_logger.info('TEST 1 --> Authentication test with VALID :: PASSED')
else: else:
test_logger.info('TEST 1 --> Authentication test with VALID :: FAILED') test_logger.info('TEST 1 --> Authentication test with VALID :: FAILED')

1
server/config/config.txt Normal file
View File

@ -0,0 +1 @@
{"index": 1, "user": [{"username": "Di\u00f3sbejglia", "password": "$2a$12$Gx9p..zJuM8uXdktzlC3vuGBSSpw1/lBCGSIK5d6cAFyKnfoPMPo6", "homeDir": "1"}]}