|
| 1 | +env -u VIRTUAL_ENV uv run pytest packages/studyloop/tests/test_web_modules.py -q -p no:cacheprovider |
| 2 | +# worktree: module-web-labs HEAD: 355db26c 2026-10-04T23:10:00Z TMPDIR=$(getconf DARWIN_USER_TEMP_DIR) (W1: no route, no Labs entry, no labs.js) |
| 3 | +E AssertionError: {"detail":"Method Not Allowed"} |
| 4 | +E assert 405 == 201 |
| 5 | +E + where 405 = <Response [405 Method Not Allowed]>.status_code |
| 6 | +________________ test_labs_cancel_leaves_the_session_untouched _________________ |
| 7 | +packages/studyloop/tests/test_web_modules.py:418: in test_labs_cancel_leaves_the_session_untouched |
| 8 | + assert started.status_code == 201, started.text |
| 9 | +E AssertionError: {"detail":"Method Not Allowed"} |
| 10 | +E assert 405 == 201 |
| 11 | +E + where 405 = <Response [405 Method Not Allowed]>.status_code |
| 12 | +_____________ test_labs_start_rejects_a_body_with_an_unknown_field _____________ |
| 13 | +packages/studyloop/tests/test_web_modules.py:438: in test_labs_start_rejects_a_body_with_an_unknown_field |
| 14 | + assert response.status_code == 422, response.text |
| 15 | +E AssertionError: {"detail":"Method Not Allowed"} |
| 16 | +E assert 405 == 422 |
| 17 | +E + where 405 = <Response [405 Method Not Allowed]>.status_code |
| 18 | +_____________ test_practice_check_without_the_token_header_is_401 ______________ |
| 19 | +packages/studyloop/tests/test_web_modules.py:452: in test_practice_check_without_the_token_header_is_401 |
| 20 | + assert response.status_code == 401, response.text |
| 21 | +E AssertionError: {"detail":"Method Not Allowed"} |
| 22 | +E assert 405 == 401 |
| 23 | +E + where 405 = <Response [405 Method Not Allowed]>.status_code |
| 24 | +_______________ test_practice_check_with_the_wrong_token_is_403 ________________ |
| 25 | +packages/studyloop/tests/test_web_modules.py:461: in test_practice_check_with_the_wrong_token_is_403 |
| 26 | + assert response.status_code == 403, response.text |
| 27 | +E AssertionError: {"detail":"Method Not Allowed"} |
| 28 | +E assert 405 == 403 |
| 29 | +E + where 405 = <Response [405 Method Not Allowed]>.status_code |
| 30 | +__ test_practice_check_from_a_non_loopback_address_is_403_even_with_the_token __ |
| 31 | +packages/studyloop/tests/test_web_modules.py:471: in test_practice_check_from_a_non_loopback_address_is_403_even_with_the_token |
| 32 | + assert response.status_code == 403, response.text |
| 33 | +E AssertionError: {"detail":"Method Not Allowed"} |
| 34 | +E assert 405 == 403 |
| 35 | +E + where 405 = <Response [405 Method Not Allowed]>.status_code |
| 36 | +______________ test_practice_check_names_an_extra_field_with_422 _______________ |
| 37 | +packages/studyloop/tests/test_web_modules.py:484: in test_practice_check_names_an_extra_field_with_422 |
| 38 | + assert response.status_code == 422, response.text |
| 39 | +E AssertionError: {"detail":"Method Not Allowed"} |
| 40 | +E assert 405 == 422 |
| 41 | +E + where 405 = <Response [405 Method Not Allowed]>.status_code |
| 42 | +_____ test_practice_check_with_no_active_session_is_200_no_active_session ______ |
| 43 | +packages/studyloop/tests/test_web_modules.py:497: in test_practice_check_with_no_active_session_is_200_no_active_session |
| 44 | + assert response.status_code == 200, response.text |
| 45 | +E AssertionError: {"detail":"Method Not Allowed"} |
| 46 | +E assert 405 == 200 |
| 47 | +E + where 405 = <Response [405 Method Not Allowed]>.status_code |
| 48 | +_____________ test_practice_check_delivers_into_the_active_session _____________ |
| 49 | +packages/studyloop/tests/test_web_modules.py:517: in test_practice_check_delivers_into_the_active_session |
| 50 | + assert response.status_code == 200, response.text |
| 51 | +E AssertionError: {"detail":"Method Not Allowed"} |
| 52 | +E assert 405 == 200 |
| 53 | +E + where 405 = <Response [405 Method Not Allowed]>.status_code |
| 54 | +_ test_practice_check_token_of_another_session_is_403_when_a_session_is_active _ |
| 55 | +packages/studyloop/tests/test_web_modules.py:539: in test_practice_check_token_of_another_session_is_403_when_a_session_is_active |
| 56 | + assert response.status_code == 403, response.text |
| 57 | +E AssertionError: {"detail":"Method Not Allowed"} |
| 58 | +E assert 405 == 403 |
| 59 | +E + where 405 = <Response [405 Method Not Allowed]>.status_code |
| 60 | +_______ test_practice_check_replay_of_the_same_attempt_and_phase_is_409 ________ |
| 61 | +packages/studyloop/tests/test_web_modules.py:553: in test_practice_check_replay_of_the_same_attempt_and_phase_is_409 |
| 62 | + assert first.status_code == 200, first.text |
| 63 | +E AssertionError: {"detail":"Method Not Allowed"} |
| 64 | +E assert 405 == 200 |
| 65 | +E + where 405 = <Response [405 Method Not Allowed]>.status_code |
| 66 | +__________ test_practice_check_sixth_envelope_within_a_minute_is_429 ___________ |
| 67 | +packages/studyloop/tests/test_web_modules.py:569: in test_practice_check_sixth_envelope_within_a_minute_is_429 |
| 68 | + assert statuses == [200, 200, 200, 200, 200, 429], statuses |
| 69 | +E AssertionError: [405, 405, 405, 405, 405, 405] |
| 70 | +E assert [405, 405, 405, 405, 405, 405] == [200, 200, 200, 200, 200, 429] |
| 71 | +E |
| 72 | +E At index 0 diff: 405 != 200 |
| 73 | +E Use -v to get more diff |
| 74 | +______________ test_practice_check_with_no_claimed_session_is_401 ______________ |
| 75 | +packages/studyloop/tests/test_web_modules.py:577: in test_practice_check_with_no_claimed_session_is_401 |
| 76 | + assert response.status_code in (401, 403), response.text |
| 77 | +E AssertionError: {"detail":"Method Not Allowed"} |
| 78 | +E assert 405 in (401, 403) |
| 79 | +E + where 405 = <Response [405 Method Not Allowed]>.status_code |
| 80 | +____________ test_practice_check_rejects_a_non_object_body_with_400 ____________ |
| 81 | +packages/studyloop/tests/test_web_modules.py:592: in test_practice_check_rejects_a_non_object_body_with_400 |
| 82 | + assert response.status_code == 400, response.text |
| 83 | +E AssertionError: {"detail":"Method Not Allowed"} |
| 84 | +E assert 405 == 400 |
| 85 | +E + where 405 = <Response [405 Method Not Allowed]>.status_code |
| 86 | +_________________ test_the_module_routes_are_mounted_under_api _________________ |
| 87 | +packages/studyloop/tests/test_web_modules.py:604: in test_the_module_routes_are_mounted_under_api |
| 88 | + assert "/api/modules/labs" in paths |
| 89 | +E AssertionError: assert '/api/modules/labs' in {'', '/', '/api/artefacts/{course}', '/api/backlog', '/api/backlog/demote', '/api/backlog/dismiss', ...} |
| 90 | +=============================== warnings summary =============================== |
| 91 | +.venv/lib/python3.12/site-packages/starlette/testclient.py:53 |
| 92 | + /Users/ataylor/code/personal/tools/studyloop-wt/module-web-labs/.venv/lib/python3.12/site-packages/starlette/testclient.py:53: DeprecationWarning: The anyio.abc.BlockingPortal alias is deprecated, use anyio.from_thread.BlockingPortal instead. |
| 93 | + _PortalFactoryType = Callable[[], AbstractContextManager[anyio.abc.BlockingPortal]] |
| 94 | + |
| 95 | +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html |
| 96 | +=========================== short test summary info ============================ |
| 97 | +FAILED packages/studyloop/tests/test_web_modules.py::test_options_list_the_installed_module_by_deck_and_task_ids_and_prompts |
| 98 | +FAILED packages/studyloop/tests/test_web_modules.py::test_labs_route_lists_ids_prompts_and_success_criteria_only |
| 99 | +FAILED packages/studyloop/tests/test_web_modules.py::test_labs_route_is_empty_with_no_module |
| 100 | +FAILED packages/studyloop/tests/test_web_modules.py::test_labs_start_refuses_an_unknown_drill_with_404 |
| 101 | +FAILED packages/studyloop/tests/test_web_modules.py::test_labs_start_starts_the_one_claimed_session_through_the_session_start_path |
| 102 | +FAILED packages/studyloop/tests/test_web_modules.py::test_labs_start_with_the_session_live_attaches_instead_of_starting_a_second |
| 103 | +FAILED packages/studyloop/tests/test_web_modules.py::test_labs_cancel_leaves_the_session_untouched |
| 104 | +FAILED packages/studyloop/tests/test_web_modules.py::test_labs_start_rejects_a_body_with_an_unknown_field |
| 105 | +FAILED packages/studyloop/tests/test_web_modules.py::test_practice_check_without_the_token_header_is_401 |
| 106 | +FAILED packages/studyloop/tests/test_web_modules.py::test_practice_check_with_the_wrong_token_is_403 |
| 107 | +FAILED packages/studyloop/tests/test_web_modules.py::test_practice_check_from_a_non_loopback_address_is_403_even_with_the_token |
| 108 | +FAILED packages/studyloop/tests/test_web_modules.py::test_practice_check_names_an_extra_field_with_422 |
| 109 | +FAILED packages/studyloop/tests/test_web_modules.py::test_practice_check_with_no_active_session_is_200_no_active_session |
| 110 | +FAILED packages/studyloop/tests/test_web_modules.py::test_practice_check_delivers_into_the_active_session |
| 111 | +FAILED packages/studyloop/tests/test_web_modules.py::test_practice_check_token_of_another_session_is_403_when_a_session_is_active |
| 112 | +FAILED packages/studyloop/tests/test_web_modules.py::test_practice_check_replay_of_the_same_attempt_and_phase_is_409 |
| 113 | +FAILED packages/studyloop/tests/test_web_modules.py::test_practice_check_sixth_envelope_within_a_minute_is_429 |
| 114 | +FAILED packages/studyloop/tests/test_web_modules.py::test_practice_check_with_no_claimed_session_is_401 |
| 115 | +FAILED packages/studyloop/tests/test_web_modules.py::test_practice_check_rejects_a_non_object_body_with_400 |
| 116 | +FAILED packages/studyloop/tests/test_web_modules.py::test_the_module_routes_are_mounted_under_api |
| 117 | +20 failed, 1 passed, 1 warning in 1.68s |
0 commit comments