change the name of the file
This commit is contained in:
parent
a702f2f9b3
commit
79b4c738e9
|
@ -31,8 +31,10 @@ def save_json(req_json, tmp_snapshots, user):
|
||||||
year = now.year
|
year = now.year
|
||||||
month = now.month
|
month = now.month
|
||||||
day = now.day
|
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)
|
path_name = os.path.join(tmp_snapshots, name_file)
|
||||||
|
|
||||||
if not os.path.isdir(tmp_snapshots):
|
if not os.path.isdir(tmp_snapshots):
|
||||||
|
|
|
@ -583,7 +583,6 @@ def test_snapshot_failed_null_chassis(app: Devicehub, user: UserClient):
|
||||||
uuid = snapshot_error['uuid']
|
uuid = snapshot_error['uuid']
|
||||||
|
|
||||||
snapshot = {'software': '', 'version': '', 'uuid': ''}
|
snapshot = {'software': '', 'version': '', 'uuid': ''}
|
||||||
# import pdb; pdb.set_trace()
|
|
||||||
with pytest.raises(TypeError):
|
with pytest.raises(TypeError):
|
||||||
user.post(res=Snapshot, data=snapshot_error)
|
user.post(res=Snapshot, data=snapshot_error)
|
||||||
|
|
||||||
|
|
Reference in New Issue