mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-10 12:02:39 +01:00
Add a tiny test for unnamed filters
Increases coverage by 1 (one) line! Woo :D
This commit is contained in:
parent
a964b7bfd0
commit
dba4739f76
1 changed files with 8 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue