Update filter test

This commit is contained in:
Jacob Bom 2017-06-18 16:25:48 +02:00
parent 2b871e6f93
commit 01f3d88788

View file

@ -254,12 +254,10 @@ class FiltersTest(BaseTest, unittest.TestCase):
self.assertTrue((Filters.text & (Filters.forwarded | Filters.entity(MessageEntity.MENTION)) self.assertTrue((Filters.text & (Filters.forwarded | Filters.entity(MessageEntity.MENTION))
)(self.message)) )(self.message))
self.assertRegexpMatches( self.assertEqual(
str((Filters.text & (Filters.forwarded | Filters.entity(MessageEntity.MENTION)))), str((Filters.text & (Filters.forwarded | Filters.entity(MessageEntity.MENTION)))),
r"<telegram.ext.filters.MergedFilter consisting of <telegram.ext.filters.(Filters.)?_" '<Filters.text and <Filters.forwarded or Filters.entity(mention)>>'
r"Text object at .*?> and <telegram.ext.filters.MergedFilter consisting of " )
r"<telegram.ext.filters.(Filters.)?_Forwarded object at .*?> or "
r"<telegram.ext.filters.(Filters.)?entity object at .*?>>>")
def test_inverted_filters(self): def test_inverted_filters(self):
self.message.text = '/test' self.message.text = '/test'