diff --git a/ereuse_devicehub/resources/action/views.py b/ereuse_devicehub/resources/action/views.py index bbd1a89f..689cb942 100644 --- a/ereuse_devicehub/resources/action/views.py +++ b/ereuse_devicehub/resources/action/views.py @@ -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): diff --git a/tests/test_snapshot.py b/tests/test_snapshot.py index 94f9f3e2..42792c2f 100644 --- a/tests/test_snapshot.py +++ b/tests/test_snapshot.py @@ -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)