- Enable backend tests in CI (remove if: false) - Fix test_products_helpers.py to pass current_user parameter - Fix test_routines_helpers.py to include short_id in products - Fix llm_context.py to use product_effect_profile correctly - All 221 tests passing
62 lines
5.9 KiB
Text
62 lines
5.9 KiB
Text
============================= test session starts ==============================
|
|
platform darwin -- Python 3.12.12, pytest-9.0.2, pluggy-1.6.0 -- /Users/piotr/dev/innercontext/backend/.venv/bin/python3
|
|
cachedir: .pytest_cache
|
|
rootdir: /Users/piotr/dev/innercontext/backend
|
|
configfile: pyproject.toml
|
|
plugins: anyio-4.12.1, cov-7.0.0
|
|
collecting ... collected 8 items / 6 deselected / 2 selected
|
|
|
|
tests/test_products_auth.py::test_household_member_cannot_edit_shared_product PASSED [ 50%]
|
|
tests/test_products_auth.py::test_household_member_cannot_delete_shared_product PASSED [100%]
|
|
|
|
================================ tests coverage ================================
|
|
______________ coverage: platform darwin, python 3.12.12-final-0 _______________
|
|
|
|
Name Stmts Miss Cover Missing
|
|
----------------------------------------------------------------------------------
|
|
innercontext/api/__init__.py 0 0 100%
|
|
innercontext/api/ai_logs.py 63 34 46% 18-30, 53-57, 69-81, 106-113
|
|
innercontext/api/auth.py 68 18 74% 65-79, 100, 106-109, 122-129, 153-158, 166
|
|
innercontext/api/auth_deps.py 25 13 48% 23, 36-48, 52-57
|
|
innercontext/api/authz.py 100 68 32% 25-26, 35-40, 48-51, 60-66, 78, 80, 83, 89-93, 105-108, 116-133, 141-150, 156-177
|
|
innercontext/api/health.py 238 115 52% 77-81, 142-146, 156-163, 179-185, 195-204, 214, 231-243, 253-270, 285-298, 313-330, 341-353, 363-371, 395-464, 474-483, 493, 510-522, 532-540
|
|
innercontext/api/inventory.py 30 13 57% 26, 36-44, 53-60
|
|
innercontext/api/llm_context.py 102 87 15% 17-21, 30-31, 39-42, 52-74, 96-147, 174-210, 242-246
|
|
innercontext/api/product_llm_tools.py 107 94 12% 12-17, 23-38, 48-82, 111-136, 143-162, 172-205
|
|
innercontext/api/products.py 638 389 39% 82, 84, 88, 106-126, 281-289, 299-301, 312-387, 396-431, 515, 519-537, 541-550, 560-566, 570-571, 581-631, 649-703, 712-727, 731, 853-891, 918, 920, 922, 924, 933-934, 983, 1005-1015, 1027-1029, 1043-1048, 1060-1072, 1081-1086, 1097-1232, 1238-1240, 1244-1257, 1263, 1296-1457
|
|
innercontext/api/profile.py 39 15 62% 36-39, 55-69
|
|
innercontext/api/routines.py 586 402 31% 63-83, 98-102, 108-116, 126-132, 300-303, 307-324, 328-333, 343-356, 371-372, 388-398, 414-433, 442-478, 487-519, 528-555, 564-573, 577-590, 596, 609-629, 652-681, 685-691, 695-698, 789-814, 819-823, 836-1068, 1076-1246, 1252, 1257-1263, 1272-1278, 1283-1285, 1299-1304, 1313-1319, 1324-1326, 1338-1342, 1351-1357, 1362-1364
|
|
innercontext/api/skincare.py 150 70 53% 103, 145-149, 158-166, 178-255, 267-277, 287-296, 306, 322-333, 343-350
|
|
innercontext/api/utils.py 22 4 82% 24, 34, 51, 59
|
|
innercontext/auth.py 236 146 38% 64-77, 127-129, 133-137, 141-149, 153-156, 161-168, 187-192, 195-210, 213-217, 220-228, 231-248, 251-264, 267, 271-274, 279, 283-284, 288-317, 325-363, 373-384
|
|
innercontext/llm.py 134 119 11% 22, 44, 62-66, 74-102, 118-214, 231-326
|
|
innercontext/llm_safety.py 18 14 22% 17-45, 58-61, 80-83
|
|
innercontext/models/__init__.py 13 0 100%
|
|
innercontext/models/ai_log.py 33 0 100%
|
|
innercontext/models/api_metadata.py 15 0 100%
|
|
innercontext/models/base.py 3 0 100%
|
|
innercontext/models/domain.py 4 0 100%
|
|
innercontext/models/enums.py 152 0 100%
|
|
innercontext/models/health.py 64 0 100%
|
|
innercontext/models/household.py 14 0 100%
|
|
innercontext/models/household_membership.py 20 0 100%
|
|
innercontext/models/pricing.py 19 0 100%
|
|
innercontext/models/product.py 226 106 53% 76-78, 203-205, 209-230, 238-356
|
|
innercontext/models/profile.py 17 0 100%
|
|
innercontext/models/routine.py 42 0 100%
|
|
innercontext/models/skincare.py 37 0 100%
|
|
innercontext/models/user.py 19 0 100%
|
|
innercontext/services/__init__.py 0 0 100%
|
|
innercontext/services/fx.py 57 42 26% 16, 20-22, 26-48, 54-67, 71-77
|
|
innercontext/services/pricing_jobs.py 62 52 16% 18-23, 27-48, 52-66, 70-85, 89-93
|
|
innercontext/validators/__init__.py 7 0 100%
|
|
innercontext/validators/base.py 22 5 77% 23, 27, 31, 35, 52
|
|
innercontext/validators/batch_validator.py 128 105 18% 37, 58-154, 167-203, 214-240, 249-273
|
|
innercontext/validators/photo_validator.py 65 54 17% 58-134, 144-152, 164-178
|
|
innercontext/validators/product_parse_validator.py 110 93 15% 108-154, 164-172, 185-198, 205-239, 243-267, 273-319, 325-339
|
|
innercontext/validators/routine_validator.py 146 114 22% 69-167, 173-175, 182-197, 201-218, 229-246, 259-275, 288-309
|
|
innercontext/validators/shopping_validator.py 78 58 26% 49-96, 102-114, 122-123, 136-142, 150-161, 169-203
|
|
----------------------------------------------------------------------------------
|
|
TOTAL 3909 2230 43%
|
|
Coverage HTML written to dir htmlcov
|
|
======================= 2 passed, 6 deselected in 0.49s ========================
|