From 2826ed44cf6a16438e0fa2d8dfbcb00ca3f29287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaspar=20L=C3=B6chte?= Date: Mon, 17 May 2021 11:16:10 +0200 Subject: [PATCH] Increase coverage of alerts --- .../entities/alerts/test_modify_alert.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/protocols/gmpv208/entities/alerts/test_modify_alert.py b/tests/protocols/gmpv208/entities/alerts/test_modify_alert.py index e2f639f2e..c6b4c4a79 100644 --- a/tests/protocols/gmpv208/entities/alerts/test_modify_alert.py +++ b/tests/protocols/gmpv208/entities/alerts/test_modify_alert.py @@ -202,3 +202,21 @@ def test_modify_alert_with_method_data(self): 'Task run status changed' '' ) + + def test_modify_missing_method_for_ticket_received(self): + with self.assertRaises(RequiredArgument): + self.gmp.modify_alert( + alert_id='a1', + condition=AlertCondition.ALWAYS, + event=AlertEvent.TICKET_RECEIVED, + method=None, + ) + + def test_modify_missing_condition_for_ticket_received(self): + with self.assertRaises(RequiredArgument): + self.gmp.modify_alert( + alert_id='a1', + condition=None, + event=AlertEvent.TICKET_RECEIVED, + method=AlertMethod.EMAIL, + )