add test orphans disks

This commit is contained in:
Cayo Puigdefabregas 2022-11-21 17:34:19 +01:00
parent 0e85b81857
commit 15d9c86104
1 changed files with 13 additions and 0 deletions

View File

@ -2393,6 +2393,19 @@ def test_list_erasures(user3: UserClientFlask):
assert status == '200 OK' assert status == '200 OK'
assert txt in body assert txt in body
uri = '/inventory/device/erasure/1/'
body, status = user3.get(uri)
assert status == '200 OK'
assert txt not in body
dev = Device.query.first()
dev.binding.kangaroo = True
db.session.commit()
body, status = user3.get(uri)
assert status == '200 OK'
assert txt in body
@pytest.mark.mvp @pytest.mark.mvp
@pytest.mark.usefixtures(conftest.app_context.__name__) @pytest.mark.usefixtures(conftest.app_context.__name__)