bugfix register desktop no hid no tags

This commit is contained in:
Cayo Puigdefabregas 2020-07-23 13:56:19 +02:00
parent c87552964b
commit 1b79f76e27
1 changed files with 3 additions and 5 deletions

View File

@ -256,19 +256,17 @@ def test_sync_execute_register_desktop_existing_no_tag():
@pytest.mark.mvp @pytest.mark.mvp
@pytest.mark.usefixtures(conftest.app_context.__name__) @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): def test_sync_execute_register_desktop_no_hid_no_tag(user: UserClient):
"""Syncs a d.Desktop without HID and no tag. """Syncs a d.Desktop without HID and no tag.
This should not fail as we don't have a way to identify it.
This should fail as we don't have a way to identify it.
""" """
device = conftest.file('pc-components.db')['device'] device = conftest.file('pc-components.db')['device']
device['owner_id'] = user.user['id'] device['owner_id'] = user.user['id']
pc = d.Desktop(**device) pc = d.Desktop(**device)
# 1: device has no HID # 1: device has no HID
pc.hid = pc.model = None pc.hid = pc.model = None
with pytest.raises(NeedsId): returned_pc = Sync().execute_register(pc)
Sync().execute_register(pc) assert returned_pc == pc
@pytest.mark.mvp @pytest.mark.mvp