From 15d9c86104af901959ef9c62fe05157fb887b131 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 21 Nov 2022 17:34:19 +0100 Subject: [PATCH] add test orphans disks --- tests/test_render_2_0.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_render_2_0.py b/tests/test_render_2_0.py index f9f82928..0a95eee1 100644 --- a/tests/test_render_2_0.py +++ b/tests/test_render_2_0.py @@ -2393,6 +2393,19 @@ def test_list_erasures(user3: UserClientFlask): assert status == '200 OK' 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.usefixtures(conftest.app_context.__name__)