fix tests
This commit is contained in:
parent
c421bdad94
commit
5913733404
|
@ -202,6 +202,8 @@ class Device(Thing):
|
||||||
'devicehub_id',
|
'devicehub_id',
|
||||||
'system_uuid',
|
'system_uuid',
|
||||||
'active',
|
'active',
|
||||||
|
'phid_bk',
|
||||||
|
'dhid_bk',
|
||||||
}
|
}
|
||||||
|
|
||||||
__table_args__ = (
|
__table_args__ = (
|
||||||
|
|
|
@ -2148,6 +2148,8 @@ def test_unbinding(user3: UserClientFlask):
|
||||||
user3.get(uri)
|
user3.get(uri)
|
||||||
|
|
||||||
old_placeholder = dev_wb.binding
|
old_placeholder = dev_wb.binding
|
||||||
|
old_phid = old_placeholder.phid
|
||||||
|
old_dhid = dev_wb.dhid
|
||||||
|
|
||||||
# page binding
|
# page binding
|
||||||
dhid = dev_wb.dhid
|
dhid = dev_wb.dhid
|
||||||
|
@ -2171,7 +2173,8 @@ def test_unbinding(user3: UserClientFlask):
|
||||||
# check new structure
|
# check new structure
|
||||||
|
|
||||||
assert dev.placeholder.binding is None
|
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.model == dev_wb.binding.device.model
|
||||||
assert old_placeholder.device != dev_wb.binding.device
|
assert old_placeholder.device != dev_wb.binding.device
|
||||||
assert Placeholder.query.filter_by(id=old_placeholder.id).first() is None
|
assert Placeholder.query.filter_by(id=old_placeholder.id).first() is None
|
||||||
|
|
Reference in New Issue