fix: recover tests

- applied pytest_async;
- fixed requirements;
- minor typos;
This commit is contained in:
Oleg A 2022-09-18 10:17:08 +03:00
parent 96ebee26e4
commit 25235e38f1
No known key found for this signature in database
GPG key ID: 5FE046817A9657C5
11 changed files with 49 additions and 46 deletions

View file

@ -1,7 +1,6 @@
import pytest
from aiogram.utils.auth_widget import check_integrity, \
generate_hash, check_token
from aiogram.utils.auth_widget import check_integrity, check_token, generate_hash
TOKEN = '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11'
@ -28,6 +27,7 @@ class Test_check_token:
"""
This case gonna be deleted
"""
def test_ok(self, data):
assert check_token(data, TOKEN) is True

View file

@ -1,11 +1,9 @@
import pytest
from aiogram.utils import markdown
class TestMarkdownEscape:
def test_equality_sign_is_escaped(self):
assert markdown.escape_md(r"e = mc2") == r"e \= mc2"
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\\\."
def test_pre_escaped(self):
assert markdown.escape_md(r"hello\.") == r"hello\\\."