From 0d899d1e6a191fc7491e7b241480d442b8252ca8 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 15 Feb 2021 12:37:18 +0100 Subject: [PATCH] adding mobil snapshot --- tests/test_snapshot.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test_snapshot.py b/tests/test_snapshot.py index 9de3c1a4..a653e95b 100644 --- a/tests/test_snapshot.py +++ b/tests/test_snapshot.py @@ -822,3 +822,18 @@ def test_snapshot_bug_smallint_hdd(app: Devicehub, user: UserClient): tmp_snapshots = app.config['TMP_SNAPSHOTS'] shutil.rmtree(tmp_snapshots) + + +@pytest.mark.mvp +def test_snapshot_mobil(app: Devicehub, user: UserClient): + """ This test check if the end_time != 0001-01-01 00:00:00+00:00 + and then we get a /devices, this create a crash + """ + snapshot_file = file('mobil') + snapshot, _ = user.post(res=Snapshot, data=snapshot_file) + device, _ = user.get(res=m.Device, item=snapshot['device']['id']) + + tmp_snapshots = app.config['TMP_SNAPSHOTS'] + shutil.rmtree(tmp_snapshots) + +