mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 02:03:04 +00:00
parent
2c6d8ed5cb
commit
fadb11515e
5 changed files with 3 additions and 345 deletions
|
|
@ -1,13 +1,7 @@
|
|||
from aiogram.types import MessageEntity
|
||||
from tests.deprecated import check_deprecated
|
||||
|
||||
|
||||
class TestMessageEntity:
|
||||
def test_extract(self):
|
||||
entity = MessageEntity(type="hashtag", length=4, offset=5)
|
||||
assert entity.extract("#foo #bar #baz") == "#bar"
|
||||
|
||||
def test_get_text(self):
|
||||
entity = MessageEntity(type="hashtag", length=4, offset=5)
|
||||
with check_deprecated("3.2", exception=AttributeError):
|
||||
assert entity.get_text("#foo #bar #baz") == "#bar"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue