Add a tiny test for unnamed filters

Increases coverage by 1 (one) line! Woo :D
This commit is contained in:
Jacob Bom 2017-06-19 21:49:42 +02:00
parent a964b7bfd0
commit dba4739f76

View file

@ -321,6 +321,14 @@ class FiltersTest(BaseTest, unittest.TestCase):
self.message.from_user.language_code = 'da'
self.assertTrue(f(self.message))
def test_custom_unnamed_filter(self):
class Unnamed(BaseFilter):
def filter(self, message):
return True
unnamed = Unnamed()
self.assertEqual(str(unnamed), Unnamed.__name__)
if __name__ == '__main__':
unittest.main()