From 3179bba9e9a8818d6b92e405c29f56b585120605 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 22 Jul 2020 14:22:42 +0200 Subject: [PATCH] bugfix add owner_id when device is create --- tests/test_device.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_device.py b/tests/test_device.py index 85e15747..83b4ecbc 100644 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -256,12 +256,14 @@ def test_sync_execute_register_desktop_existing_no_tag(): @pytest.mark.mvp @pytest.mark.usefixtures(conftest.app_context.__name__) -def test_sync_execute_register_desktop_no_hid_no_tag(): +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. """ - pc = d.Desktop(**conftest.file('pc-components.db')['device']) + 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):