From 7fc830700baf53583eb83db6b0d288128dfaf840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Wed, 25 Dec 2024 10:12:20 -0800 Subject: [PATCH] Add one more test --- tests/test_command_dome.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_command_dome.py b/tests/test_command_dome.py index f037b36..2a785f7 100644 --- a/tests/test_command_dome.py +++ b/tests/test_command_dome.py @@ -138,3 +138,10 @@ async def test_dome_anti_flap(actor: ECPActor, mocker: MockerFixture): with pytest.raises(DomeError): await actor.plc.dome.open() await asyncio.sleep(0.1) + + +async def test_dome_not_allowed(actor: ECPActor, mocker: MockerFixture): + mocker.patch.object(actor.plc.dome, "is_allowed", return_value=False) + + with pytest.raises(DomeError, match="Dome is not allowed to open."): + await actor.plc.dome.open()