From 3e232e40c7c0a0e8a5fa0d2421a31e907901ec66 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 17 Aug 2021 11:06:04 +0200 Subject: [PATCH] base of test unassign --- tests/test_device.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_device.py b/tests/test_device.py index c428229e..6ee5f9f8 100644 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -500,6 +500,19 @@ def test_get_devices_permissions(app: Devicehub, user: UserClient, user2: UserCl assert len(devices['items']) == 1 assert len(devices2['items']) == 0 + +@pytest.mark.mvp +def test_get_devices_unassigned(app: Devicehub, user: UserClient): + """Checks GETting multiple devices.""" + + user.post(file('asus-eee-1000h.snapshot.11'), res=m.Snapshot) + url = '/devices/?filter={"type":["Computer"]}&unassign=0' + + devices, res = user.get(url, None) + assert res.status_code == 200 + assert len(devices['items']) == 1 + + @pytest.mark.mvp @pytest.mark.usefixtures(conftest.auth_app_context.__name__) def test_computer_monitor():