forked from mtusi2026/mtusi2026lab2
65 lines
4.8 KiB
Plaintext
65 lines
4.8 KiB
Plaintext
# Дата (UTC): 2026-10-23 10:17:28
|
|
# Commit: 65003b6
|
|
# Команда: docker compose --env-file .env --profile test run --rm tests python -m pytest -v --no-header -p no:cacheprovider student-tests/test_auth.py student-tests/test_session_expiry.py
|
|
# ---------------------------------------- вывод ----------------------------------------
|
|
============================= test session starts ==============================
|
|
collecting ... collected 38 items
|
|
|
|
student-tests/test_auth.py::test_register_returns_user_without_secrets PASSED [ 2%]
|
|
student-tests/test_auth.py::test_register_password_rules[None] PASSED [ 5%]
|
|
student-tests/test_auth.py::test_register_password_rules[] PASSED [ 7%]
|
|
student-tests/test_auth.py::test_register_password_rules[short] PASSED [ 10%]
|
|
student-tests/test_auth.py::test_register_password_rules[aaaaaaaaaaa] PASSED [ 13%]
|
|
student-tests/test_auth.py::test_register_password_rules[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 15%]
|
|
student-tests/test_auth.py::test_register_password_rules[123456789012] PASSED [ 18%]
|
|
student-tests/test_auth.py::test_register_password_rules[\u043f\u0430\u0440\u043e\u043b\u044c] PASSED [ 21%]
|
|
student-tests/test_auth.py::test_register_password_border_lengths PASSED [ 23%]
|
|
student-tests/test_auth.py::test_login_success_shape PASSED [ 26%]
|
|
student-tests/test_auth.py::test_each_login_gives_new_token PASSED [ 28%]
|
|
student-tests/test_auth.py::test_wrong_password_and_unknown_user_look_the_same PASSED [ 31%]
|
|
student-tests/test_auth.py::test_malformed_basic_is_401[Basic] PASSED [ 34%]
|
|
student-tests/test_auth.py::test_malformed_basic_is_401[Basic !!!not-base64!!!] PASSED [ 36%]
|
|
student-tests/test_auth.py::test_malformed_basic_is_401[Basic bm9jb2xvbg==] PASSED [ 39%]
|
|
student-tests/test_auth.py::test_malformed_basic_is_401[Basic 0LjQvNGPOnBhc3N3b3JkLTEyMzQ1Ng==] PASSED [ 42%]
|
|
student-tests/test_auth.py::test_malformed_basic_is_401[Basic dXNlcjr//i1iYWQtdXRmOA==] PASSED [ 44%]
|
|
student-tests/test_auth.py::test_malformed_basic_is_401[Bearer abc] PASSED [ 47%]
|
|
student-tests/test_auth.py::test_malformed_basic_is_401[] PASSED [ 50%]
|
|
student-tests/test_auth.py::test_login_without_header_is_401 PASSED [ 52%]
|
|
student-tests/test_auth.py::test_password_with_colon_and_unicode_works PASSED [ 55%]
|
|
student-tests/test_auth.py::test_bearer_token_gives_access PASSED [ 57%]
|
|
student-tests/test_auth.py::test_business_endpoint_rejects_basic PASSED [ 60%]
|
|
student-tests/test_auth.py::test_bad_or_unknown_bearer_is_401[] PASSED [ 63%]
|
|
student-tests/test_auth.py::test_bad_or_unknown_bearer_is_401[Bearer] PASSED [ 65%]
|
|
student-tests/test_auth.py::test_bad_or_unknown_bearer_is_401[Bearer short] PASSED [ 68%]
|
|
student-tests/test_auth.py::test_bad_or_unknown_bearer_is_401[Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] PASSED [ 71%]
|
|
student-tests/test_auth.py::test_bad_or_unknown_bearer_is_401[Token abc] PASSED [ 73%]
|
|
student-tests/test_auth.py::test_bad_or_unknown_bearer_is_401[bearer] PASSED [ 76%]
|
|
student-tests/test_auth.py::test_x_user_id_alone_gives_no_access PASSED [ 78%]
|
|
student-tests/test_auth.py::test_x_user_id_does_not_change_owner_of_session PASSED [ 81%]
|
|
student-tests/test_auth.py::test_logout_revokes_token_and_repeat_is_401 PASSED [ 84%]
|
|
student-tests/test_auth.py::test_logout_without_token_is_401 PASSED [ 86%]
|
|
student-tests/test_auth.py::test_logout_revokes_only_current_session PASSED [ 89%]
|
|
student-tests/test_auth.py::test_session_lives_longer_than_300_seconds PASSED [ 92%]
|
|
student-tests/test_session_expiry.py::test_session_expires_after_ttl PASSED [ 94%]
|
|
student-tests/test_session_expiry.py::test_expired_sessions_are_cleaned_on_next_login PASSED [ 97%]
|
|
student-tests/test_session_expiry.py::test_short_ttl_from_environment_variable PASSED [100%]
|
|
|
|
=============================== warnings summary ===============================
|
|
../usr/local/lib/python3.12/site-packages/fastapi/testclient.py:1
|
|
/usr/local/lib/python3.12/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.
|
|
from starlette.testclient import TestClient as TestClient # noqa
|
|
|
|
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
|
|
======================== 38 passed, 1 warning in 8.97s =========================
|
|
Container messenger-db Running
|
|
Container messenger-redis Running
|
|
Container messenger-db Waiting
|
|
Container messenger-redis Waiting
|
|
Container messenger-redis Healthy
|
|
Container messenger-db Healthy
|
|
Container mtusi-messenger-tests-run-5a33a2ea2bbb Creating
|
|
Container mtusi-messenger-tests-run-5a33a2ea2bbb Created
|
|
# ---------------------------------------------------------------------------------------
|
|
# Код возврата: 0
|
|
# Время выполнения: 12.15 с
|