change the name of the file

This commit is contained in:
Cayo Puigdefabregas 2020-10-15 11:00:11 +02:00
parent a702f2f9b3
commit 79b4c738e9
2 changed files with 3 additions and 2 deletions

View File

@ -31,8 +31,10 @@ def save_json(req_json, tmp_snapshots, user):
year = now.year
month = now.month
day = now.day
hour = now.hour
minutes = now.min
name_file = f"{uuid}_{user}_{year}-{month}-{day}.json"
name_file = f"{year}-{month}-{day}-{hour}-{minutes}_{user}_{uuid}.json"
path_name = os.path.join(tmp_snapshots, name_file)
if not os.path.isdir(tmp_snapshots):

View File

@ -583,7 +583,6 @@ def test_snapshot_failed_null_chassis(app: Devicehub, user: UserClient):
uuid = snapshot_error['uuid']
snapshot = {'software': '', 'version': '', 'uuid': ''}
# import pdb; pdb.set_trace()
with pytest.raises(TypeError):
user.post(res=Snapshot, data=snapshot_error)