aiogram/tests/test_utils/test_markdown.py

12 lines
267 B
Python
Raw Normal View History

2020-06-21 20:25:32 +03:00
import pytest
from aiogram.utils import markdown
2020-06-27 16:17:19 +03:00
class TestMarkdownEscape:
2020-06-21 20:25:32 +03:00
def test_equality_sign_is_escaped(self):
assert markdown.escape_md(r"e = mc2") == r"e \= mc2"
def test_pre_escaped(self):
assert markdown.escape_md(r"hello\.") == r"hello\\\."