Authentication_test corrections
continuous-integration/drone/push Build is passing Details

This commit is contained in:
DESKTOP-DPA61F8\Benedek 2021-04-25 16:06:56 +02:00
parent c69241249e
commit 3dbde8fbb8
2 changed files with 5 additions and 3 deletions

View File

@ -68,10 +68,13 @@ def testPersistency():
logging.info('PERSISTENCY TEST')
auth = Authetication()
auth.initConfig()
serverPublicKey = init.generatePrivateKeyForServer(auth, 'admin')
auth.saveUser('alma','alma')
init.generatePrivateKeyForUser(auth, 'alma', 'amla')
homeDir = auth.login('alma','alma')
init.generatePrivateKeyForUser(auth, 'alma', 'amla', serverPublicKey, init.generateSourceAddress(homeDir))
auth.saveUser('citrom','citrom')
init.generatePrivateKeyForUser(auth, 'citrom', 'mortic')
homeDir = auth.login('citrom','citrom')
init.generatePrivateKeyForUser(auth, 'citrom', 'mortic', serverPublicKey, init.generateSourceAddress(homeDir))
auth2 = Authetication()
if auth2.checkUserExists('alma'):

View File

@ -5,7 +5,6 @@ from Crypto.PublicKey import RSA
from authentication import Authetication
def generatePrivateKeyForUser(auth: Authetication,username: str, user_passphrase: str, public_server_key: str,address: str) -> bool:
if auth.checkUserExists(username):
with open(auth.CONFIG_FILE_LOCATION) as json_file: