def test_matching_tags_only(self):
        message1 = MessagetagsTest._message('test1', ['notinteresting'])
        message2 = MessagetagsTest._message('test2', ['interesting'])
        message3 = MessagetagsTest._message('test3', ['interesting', 'error'])

        self.assertEqual(tags.messagetags(
            [message1, message2, message3], 'interesting'),
            [message2, message3])
Пример #2
0
    def test_matching_tags_only(self):
        message1 = MessagetagsTest._Message('test1', ['notinteresting'])
        message2 = MessagetagsTest._Message('test2', ['interesting'])
        message3 = MessagetagsTest._Message('test3', ['interesting', 'error'])

        self.assertEqual(
            tags.messagetags([message1, message2, message3], 'interesting'),
            [message2, message3])
    def test_empty_for_non_matching_tags(self):
        message1 = MessagetagsTest._message('test', ['notinteresting'])

        self.assertEqual(tags.messagetags([message1], 'interesting'),
                         [])
 def test_empty_messages(self):
     self.assertEqual(tags.messagetags([], None), [])
Пример #5
0
    def test_empty_for_non_matching_tags(self):
        message1 = MessagetagsTest._Message('test', ['notinteresting'])

        self.assertEqual(tags.messagetags([message1], 'interesting'), [])
Пример #6
0
 def test_empty_messages(self):
     self.assertEqual(tags.messagetags([], None), [])