diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index 01845ca7..7735c817 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -202,6 +202,8 @@ class Device(Thing): 'devicehub_id', 'system_uuid', 'active', + 'phid_bk', + 'dhid_bk', } __table_args__ = ( diff --git a/tests/test_render_2_0.py b/tests/test_render_2_0.py index fc62572d..0c1615a5 100644 --- a/tests/test_render_2_0.py +++ b/tests/test_render_2_0.py @@ -2148,6 +2148,8 @@ def test_unbinding(user3: UserClientFlask): user3.get(uri) old_placeholder = dev_wb.binding + old_phid = old_placeholder.phid + old_dhid = dev_wb.dhid # page binding dhid = dev_wb.dhid @@ -2171,7 +2173,8 @@ def test_unbinding(user3: UserClientFlask): # check new structure assert dev.placeholder.binding is None - assert dev_wb.binding.phid == '2' + assert dev_wb.binding.phid == old_phid + assert dev_wb.dhid == old_dhid assert old_placeholder.device.model == dev_wb.binding.device.model assert old_placeholder.device != dev_wb.binding.device assert Placeholder.query.filter_by(id=old_placeholder.id).first() is None