From 1b79f76e27018f5e001d5aaab3572feaa477b6ed Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 23 Jul 2020 13:56:19 +0200 Subject: [PATCH] bugfix register desktop no hid no tags --- tests/test_device.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/test_device.py b/tests/test_device.py index 16b7bb2d..091a1317 100644 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -256,19 +256,17 @@ def test_sync_execute_register_desktop_existing_no_tag(): @pytest.mark.mvp @pytest.mark.usefixtures(conftest.app_context.__name__) -@pytest.mark.xfail(reason='it is necessary fixed') def test_sync_execute_register_desktop_no_hid_no_tag(user: UserClient): """Syncs a d.Desktop without HID and no tag. - - This should fail as we don't have a way to identify it. + This should not fail as we don't have a way to identify it. """ device = conftest.file('pc-components.db')['device'] device['owner_id'] = user.user['id'] pc = d.Desktop(**device) # 1: device has no HID pc.hid = pc.model = None - with pytest.raises(NeedsId): - Sync().execute_register(pc) + returned_pc = Sync().execute_register(pc) + assert returned_pc == pc @pytest.mark.mvp