Skip to content

Commit

Permalink
Increase coverage of alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
y0urself committed May 17, 2021
1 parent 9761fe9 commit 2826ed4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/protocols/gmpv208/entities/alerts/test_modify_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,21 @@ def test_modify_alert_with_method_data(self):
'<event>Task run status changed</event>'
'</modify_alert>'
)

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,
)

0 comments on commit 2826ed4

Please sign in to comment.