{"nodes": [{"id": "backend_tests_test_swiftly_api_py", "label": "test_swiftly_api.py", "file_type": "code", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L1"}, {"id": "test_swiftly_api_test_parse_categories_fixture", "label": "test_parse_categories_fixture()", "file_type": "code", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L40"}, {"id": "test_swiftly_api_test_parse_category_response_fixture", "label": "test_parse_category_response_fixture()", "file_type": "code", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L57"}, {"id": "test_swiftly_api_test_map_product_returns_none_for_unparseable", "label": "test_map_product_returns_none_for_unparseable()", "file_type": "code", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L107"}, {"id": "test_swiftly_api_mock_response", "label": "_mock_response()", "file_type": "code", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L121"}, {"id": "test_swiftly_api_test_swiftly_auth_error_on_401_from_api", "label": "test_swiftly_auth_error_on_401_from_api()", "file_type": "code", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L135"}, {"id": "test_swiftly_api_test_fetch_category_mints_token_when_none_pinned", "label": "test_fetch_category_mints_token_when_none_pinned()", "file_type": "code", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L146"}, {"id": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "label": "test_background_runner_writes_failed_with_token_message()", "file_type": "code", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L171"}, {"id": "test_swiftly_api_rationale_1", "label": "Offline tests for the Swiftly product-API client (R3-0). All tests run against", "file_type": "rationale", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L1"}, {"id": "test_swiftly_api_rationale_41", "label": "Parser returns >=10 distinct API slugs from the captured page.", "file_type": "rationale", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L41"}, {"id": "test_swiftly_api_rationale_58", "label": "Parser returns >=10 product dicts each with the mapped fields populated.", "file_type": "rationale", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L58"}, {"id": "test_swiftly_api_rationale_108", "label": "Products with no name AND no parseable price are dropped.", "file_type": "rationale", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L108"}, {"id": "test_swiftly_api_rationale_136", "label": "A 401 from the API host raises SwiftlyAuthError before raise_for_status.", "file_type": "rationale", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L136"}, {"id": "test_swiftly_api_rationale_147", "label": "With no explicit bearer_token, fetch_category calls swiftly_auth.get_token()", "file_type": "rationale", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L147"}, {"id": "test_swiftly_api_rationale_172", "label": "A 401 during the background scrape lands in ScrapeLog as FAILED + message.", "file_type": "rationale", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L172"}], "edges": [{"source": "backend_tests_test_swiftly_api_py", "target": "json", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L9", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "sys", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L10", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "uuid", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L11", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "decimal", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L12", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "pathlib", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L13", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "unittest_mock", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L14", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "pytest", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L16", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "requests", "relation": "imports", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L17", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "app_scraper_lucky_ca_scraper", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L24", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "test_swiftly_api_test_parse_categories_fixture", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L40", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "test_swiftly_api_test_parse_category_response_fixture", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L57", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "test_swiftly_api_test_map_product_returns_none_for_unparseable", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L107", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "test_swiftly_api_mock_response", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L121", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "test_swiftly_api_test_swiftly_auth_error_on_401_from_api", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L135", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "test_swiftly_api_test_fetch_category_mints_token_when_none_pinned", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L146", "weight": 1.0}, {"source": "backend_tests_test_swiftly_api_py", "target": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "relation": "contains", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L171", "weight": 1.0}, {"source": "test_swiftly_api_test_swiftly_auth_error_on_401_from_api", "target": "test_swiftly_api_mock_response", "relation": "calls", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L139", "weight": 1.0}, {"source": "test_swiftly_api_test_fetch_category_mints_token_when_none_pinned", "target": "test_swiftly_api_mock_response", "relation": "calls", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L159", "weight": 1.0}, {"source": "test_swiftly_api_rationale_1", "target": "backend_tests_test_swiftly_api_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L1", "weight": 1.0}, {"source": "test_swiftly_api_rationale_41", "target": "test_swiftly_api_test_parse_categories_fixture", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L41", "weight": 1.0}, {"source": "test_swiftly_api_rationale_58", "target": "test_swiftly_api_test_parse_category_response_fixture", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L58", "weight": 1.0}, {"source": "test_swiftly_api_rationale_108", "target": "test_swiftly_api_test_map_product_returns_none_for_unparseable", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L108", "weight": 1.0}, {"source": "test_swiftly_api_rationale_136", "target": "test_swiftly_api_test_swiftly_auth_error_on_401_from_api", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L136", "weight": 1.0}, {"source": "test_swiftly_api_rationale_147", "target": "test_swiftly_api_test_fetch_category_mints_token_when_none_pinned", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L147", "weight": 1.0}, {"source": "test_swiftly_api_rationale_172", "target": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L172", "weight": 1.0}], "raw_calls": [{"caller_nid": "test_swiftly_api_test_parse_categories_fixture", "callee": "exists", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L42"}, {"caller_nid": "test_swiftly_api_test_parse_categories_fixture", "callee": "skip", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L43"}, {"caller_nid": "test_swiftly_api_test_parse_categories_fixture", "callee": "read_text", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L44"}, {"caller_nid": "test_swiftly_api_test_parse_categories_fixture", "callee": "parse_categories_html", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L46"}, {"caller_nid": "test_swiftly_api_test_parse_categories_fixture", "callee": "len", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L48"}, {"caller_nid": "test_swiftly_api_test_parse_categories_fixture", "callee": "len", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L48"}, {"caller_nid": "test_swiftly_api_test_parse_categories_fixture", "callee": "len", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L49"}, {"caller_nid": "test_swiftly_api_test_parse_categories_fixture", "callee": "set", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L49"}, {"caller_nid": "test_swiftly_api_test_parse_categories_fixture", "callee": "len", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L49"}, {"caller_nid": "test_swiftly_api_test_parse_categories_fixture", "callee": "startswith", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L52"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "exists", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L59"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "skip", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L60"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "loads", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L61"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "read_text", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L61"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "parse_category_response", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L63"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "len", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L64"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "len", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L64"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "map_product", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L68"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "append", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L72"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "len", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L74"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "len", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L75"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "len", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L76"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "isinstance", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L95"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "isinstance", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L96"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "strip", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L96"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "isinstance", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L97"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "isinstance", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L99"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "any", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L103"}, {"caller_nid": "test_swiftly_api_test_parse_category_response_fixture", "callee": "any", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L104"}, {"caller_nid": "test_swiftly_api_test_map_product_returns_none_for_unparseable", "callee": "map_product", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L109"}, {"caller_nid": "test_swiftly_api_test_map_product_returns_none_for_unparseable", "callee": "map_product", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L111"}, {"caller_nid": "test_swiftly_api_mock_response", "callee": "MagicMock", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L122"}, {"caller_nid": "test_swiftly_api_mock_response", "callee": "HTTPError", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L127"}, {"caller_nid": "test_swiftly_api_test_swiftly_auth_error_on_401_from_api", "callee": "LuckyCaliforniaScraper", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L137"}, {"caller_nid": "test_swiftly_api_test_swiftly_auth_error_on_401_from_api", "callee": "object", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L139"}, {"caller_nid": "test_swiftly_api_test_swiftly_auth_error_on_401_from_api", "callee": "raises", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L140"}, {"caller_nid": "test_swiftly_api_test_swiftly_auth_error_on_401_from_api", "callee": "fetch_category", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L141"}, {"caller_nid": "test_swiftly_api_test_swiftly_auth_error_on_401_from_api", "callee": "str", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L143"}, {"caller_nid": "test_swiftly_api_test_fetch_category_mints_token_when_none_pinned", "callee": "LuckyCaliforniaScraper", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L152"}, {"caller_nid": "test_swiftly_api_test_fetch_category_mints_token_when_none_pinned", "callee": "object", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L155"}, {"caller_nid": "test_swiftly_api_test_fetch_category_mints_token_when_none_pinned", "callee": "object", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L156"}, {"caller_nid": "test_swiftly_api_test_fetch_category_mints_token_when_none_pinned", "callee": "fetch_category", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L163"}, {"caller_nid": "test_swiftly_api_test_fetch_category_mints_token_when_none_pinned", "callee": "assert_called_once", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L165"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "uuid4", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L184"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "SessionLocal", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L185"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "add", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L187"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "ScrapeLog", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L188"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "now", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L193"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "commit", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L196"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "close", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L198"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "setattr", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L206"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "_run_scrape_in_background", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L209"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "SessionLocal", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L213"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "first", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L216"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "filter", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L216"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "query", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L216"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "close", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L225"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "SessionLocal", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L227"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "delete", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L229"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "filter", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L229"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "query", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L229"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "commit", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L230"}, {"caller_nid": "test_swiftly_api_test_background_runner_writes_failed_with_token_message", "callee": "close", "source_file": "backend/tests/test_swiftly_api.py", "source_location": "L232"}]}