def test_matching_message(self):

        # Low severity messages are ignored unless flagged as not ignorable.
        for severity in 'low', 'trivial':
            self.compare({'id': ('a', 'b', 'c'),
                          'signing_severity': severity,
                          'context': ('x', 'y', 'z'),
                          'file': 'foo.js'},
                         {},
                         {'ignored': True,
                          'matched': self.old_msg})

            self.compare({'id': ('a', 'b', 'c'),
                          'signing_severity': severity,
                          'ignore_duplicates': False,
                          'context': ('x', 'y', 'z'),
                          'file': 'foo.js'},
                         {},
                         {'ignored': False,
                          'matched': self.old_msg})

        # Other severities are ignored only when flagged as ignorable.
        for severity in 'medium', 'high':
            self.compare({'id': ('a', 'b', 'c'),
                          'signing_severity': severity,
                          'context': ('x', 'y', 'z'),
                          'file': 'foo.js'},
                         {},
                         {'ignored': False,
                          'matched': self.old_msg})

            self.compare({'id': ('a', 'b', 'c'),
                          'signing_severity': severity,
                          'ignore_duplicates': True,
                          'context': ('x', 'y', 'z'),
                          'file': 'foo.js'},
                         {},
                         {'ignored': True,
                          'matched': self.old_msg})

        # Check that unchecked properties don't matter.
        self.compare({'id': ('a', 'b', 'c'),
                      'signing_severity': 'low',
                      'context': ('x', 'y', 'z'),
                      'file': 'foo.js'},
                     {'thing': 'stuff'},
                     {'ignored': True,
                      'matched': self.old_msg})

        # Non-signing messages should be matched, but not annotated for
        # ignorability.
        self.compare({'id': ('a', 'b', 'c'),
                      'context': ('x', 'y', 'z'),
                      'file': 'foo.js'},
                     {},
                     {'matched': self.old_msg})
Test the behavior of matching messages.
dataset/ETHPy150Open mozilla/addons-server/src/olympia/devhub/tests/test_utils.py/TestValidationComparator.test_matching_message