Beispiel #1
0
 def test_get_exclusions(self):
     reader = [
         {"MESSAGE": "message 1", "MESSAGE1": "x", "KEY": "multiple"},
         {"MESSAGE": "message 1", "MESSAGE1": "x", "KEY": "multiple"},
         {"MESSAGE": "message 1", "MESSAGE1": "x"},
         {"MESSAGE": "message 1", "MESSAGE1": "x"},
         {"MESSAGE": "message 2", "KEY": "multiple"},
         {"MESSAGE": "message 2", "KEY": "single"},
     ]
     dbr = Debriefer(reader)
     exclusions = dbr.get_exclusions()
     assert "".join(map(str, exclusions)) == "\n".join(
         [
             "# 4 occurrences (out of 6)",
             "- MESSAGE:",
             "  - message 1",
             "  MESSAGE1:",
             "  - x",
             "# 2 occurrences (out of 2)",
             "- MESSAGE:",
             "  - message 2",
             "",
         ]
     )