Esempio n. 1
0
 def test_not_recipient(self):
     assert_raise_library_error(
         lambda: alert.get_recipient_by_id(self.xml, "rec-3"),
         (severities.ERROR, report_codes.ID_NOT_FOUND, {
             "id": "rec-3",
             "id_description": "Recipient"
         }))
Esempio n. 2
0
 def test_exist(self):
     assert_xml_equal(
         '<recipient id="rec-1" value="value1"/>',
         etree.tostring(
             alert.get_recipient_by_id(self.xml, "rec-1")
         ).decode()
     )
Esempio n. 3
0
 def test_not_recipient(self):
     assert_raise_library_error(
         lambda: alert.get_recipient_by_id(self.xml, "rec-3"),
         (
             severities.ERROR,
             report_codes.ID_NOT_FOUND,
             {
                 "id": "rec-3",
                 "id_description": "Recipient"
             }
         )
     )
Esempio n. 4
0
 def test_exist(self):
     assert_xml_equal(
         '<recipient id="rec-1" value="value1"/>',
         etree.tostring(alert.get_recipient_by_id(self.xml,
                                                  "rec-1")).decode())