aiogram/tests/test_utils/test_deprecated.py
deepsource-autofix[bot] af4ceef153
Format code with black, autopep8 and isort
This commit fixes the style issues introduced in dd50a9b according to the output
from black, autopep8 and isort.

Details: 4e472085-2e87-4f61-b7a1-ed208506962f/
2020-11-08 21:49:34 +00:00

24 lines
685 B
Python

import pytest
from aiogram.utils.deprecated import DeprecatedReadOnlyClassVar
def test_DeprecatedReadOnlyClassVarCD():
if DeprecatedReadOnlyClassVar.__slots__ != (
"_new_value_getter",
"_warning_message",
):
raise AssertionError
new_value_of_deprecated_cls_cd = "mpa"
deprecated_cd = DeprecatedReadOnlyClassVar(
"mopekaa", lambda owner: new_value_of_deprecated_cls_cd
)
with pytest.warns(DeprecationWarning):
pseudo_owner_cls = type("OpekaCla$$", (), {})
if (
deprecated_cd.__get__(None, pseudo_owner_cls)
!= new_value_of_deprecated_cls_cd
):
raise AssertionError