test: remove duplicated descriptions from tests

This commit is contained in:
2024-10-20 23:26:04 +03:00
parent 7c6c24a46d
commit 6fe77eb465
23 changed files with 38 additions and 73 deletions

View File

@ -98,7 +98,7 @@ async def test_exception_handler_unauthorized(mocker: MockerFixture) -> None:
async def test_exception_handler_unauthorized_templated(mocker: MockerFixture) -> None:
"""
must handle unauthorized exception as json response
must handle unauthorized exception as json response in html context
"""
request = pytest.helpers.request("", "", "")
request_handler = AsyncMock(side_effect=HTTPUnauthorized())

View File

@ -124,7 +124,7 @@ def test_run_with_auth(application_with_auth: Application, mocker: MockerFixture
def test_run_with_socket(application: Application, mocker: MockerFixture) -> None:
"""
must run application
must run application with socket
"""
port = 8080
application[ConfigurationKey].set_option("web", "port", str(port))

View File

@ -158,7 +158,7 @@ async def test_post_unauthorized(client_with_auth: TestClient, user: User, mocke
async def test_post_invalid_json(client_with_auth: TestClient, mocker: MockerFixture) -> None:
"""
must return unauthorized on invalid auth
must return unauthorized on invalid payload
"""
response_schema = pytest.helpers.schema_response(LoginView.post, code=400)
remember_mock = mocker.patch("aiohttp_security.remember")