bugfix
This commit is contained in:
parent
2a53e1672c
commit
99a12b2b22
|
@ -30,7 +30,7 @@ def save_json(req_json):
|
|||
The file need to be saved with one name format with the stamptime and uuid joins
|
||||
"""
|
||||
name_file = "{uuid}_{time}.json".format(uuid=req_json.get('uuid', ''), time=int(time()))
|
||||
path_name = os.path.join(tmp=TMP_SNAPSHOTS, file=name_file)
|
||||
path_name = os.path.join(TMP_SNAPSHOTS, name_file)
|
||||
|
||||
if not os.path.isdir(TMP_SNAPSHOTS):
|
||||
os.system('mkdir -p {}'.format(TMP_SNAPSHOTS))
|
||||
|
|
|
@ -491,7 +491,7 @@ def test_save_snapshot_in_file():
|
|||
|
||||
snapshot = {'software': '', 'version': '', 'uuid': ''}
|
||||
if files:
|
||||
path_snapshot = os.path.join(dir=TMP_SNAPSHOTS, file=files[0])
|
||||
path_snapshot = os.path.join(TMP_SNAPSHOTS, files[0])
|
||||
file_snapshot = open(path_snapshot)
|
||||
snapshot = json.loads(file_snapshot.read())
|
||||
file_snapshot.close()
|
||||
|
@ -514,7 +514,7 @@ def test_backup_snapshot_with_errors(user: UserClient):
|
|||
|
||||
files = [x for x in os.listdir(TMP_SNAPSHOTS) if uuid in x]
|
||||
if files:
|
||||
path_snapshot = os.path.join(dir=TMP_SNAPSHOTS, file=files[0])
|
||||
path_snapshot = os.path.join(TMP_SNAPSHOTS, files[0])
|
||||
file_snapshot = open(path_snapshot)
|
||||
snapshot = json.loads(file_snapshot.read())
|
||||
file_snapshot.close()
|
||||
|
|
Reference in a new issue