tests: add representation coverage

#988
This commit is contained in:
Oleg A 2022-08-24 11:08:20 +03:00
parent 7e3ff9a7ce
commit 4b9149ac8f
No known key found for this signature in database
GPG key ID: 5FE046817A9657C5

View file

@ -0,0 +1,15 @@
import pytest
from aiogram.exceptions import DetailedAiogramError
class TestException:
@pytest.mark.parametrize(
"message,result",
[
["reason", "DetailedAiogramError('reason')"],
],
)
def test_representation(self, message: str, result: bool):
exc = DetailedAiogramError(message=message)
assert repr(exc) == result