mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
#238 Improved deep_link test cases
This commit is contained in:
parent
768407eb95
commit
c23c7a2025
1 changed files with 3 additions and 3 deletions
|
|
@ -271,13 +271,13 @@ class TestCommandStart:
|
|||
test_filter = CommandStart() # empty filter
|
||||
message = Message(text=self.START)
|
||||
result = await test_filter.check(message)
|
||||
assert result is not False
|
||||
assert result == {'deep_link': None}
|
||||
|
||||
async def test_start_command_payload_is_matched(self):
|
||||
test_filter = CommandStart(deep_link=self.GOOD)
|
||||
message = Message(text=f'{self.START} {self.GOOD}')
|
||||
result = await test_filter.check(message)
|
||||
assert result is True
|
||||
assert result == {'deep_link': self.GOOD}
|
||||
|
||||
async def test_start_command_payload_is_not_matched(self):
|
||||
test_filter = CommandStart(deep_link=self.GOOD)
|
||||
|
|
@ -289,4 +289,4 @@ class TestCommandStart:
|
|||
test_filter = CommandStart(deep_link=self.GOOD, encoded=True)
|
||||
message = Message(text=f'{self.START} {self.ENCODED}')
|
||||
result = await test_filter.check(message)
|
||||
assert result is True
|
||||
assert result == {'deep_link': self.GOOD}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue