| 1 |
- {"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "label": "test_data_scope.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L1"}, {"id": "tests_test_data_scope_fakemodel", "label": "_FakeModel", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L18"}, {"id": "tests_test_data_scope_test_super_admin_bypass_apply", "label": "test_super_admin_bypass_apply()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L24"}, {"id": "tests_test_data_scope_test_scope4_invokes_filter_via_scope_collection", "label": "test_scope4_invokes_filter_via_scope_collection()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L31"}, {"id": "tests_test_data_scope_test_scope4_with_owner_field_passes_owner_to_helper", "label": "test_scope4_with_owner_field_passes_owner_to_helper()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L49"}, {"id": "tests_test_data_scope_test_no_role_scopes_returns_empty_query", "label": "test_no_role_scopes_returns_empty_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L71"}, {"id": "tests_test_data_scope_test_row_in_data_scope_super_admin", "label": "test_row_in_data_scope_super_admin()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L79"}, {"id": "tests_test_data_scope_test_row_in_data_scope_self_by_create_by", "label": "test_row_in_data_scope_self_by_create_by()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L84"}, {"id": "tests_test_data_scope_test_row_in_data_scope_self_by_owner_field", "label": "test_row_in_data_scope_self_by_owner_field()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L94"}, {"id": "tests_test_data_scope_test_row_in_data_scope_denied", "label": "test_row_in_data_scope_denied()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L109"}, {"id": "tests_test_data_scope_test_assert_row_in_data_scope_raises_403", "label": "test_assert_row_in_data_scope_raises_403()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L119"}, {"id": "tests_test_data_scope_rationale_1", "label": "\u6570\u636e\u6743\u9650 apply_data_scope / row_in_data_scope \u5355\u5143\u6d4b\u8bd5\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "types", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "unittest_mock", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "pytest", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L8", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "app_core_data_scope", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L11", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "tests_test_data_scope_fakemodel", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L18", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "tests_test_data_scope_test_super_admin_bypass_apply", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L24", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "tests_test_data_scope_test_scope4_invokes_filter_via_scope_collection", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L31", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "tests_test_data_scope_test_scope4_with_owner_field_passes_owner_to_helper", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L49", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "tests_test_data_scope_test_no_role_scopes_returns_empty_query", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L71", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "tests_test_data_scope_test_row_in_data_scope_super_admin", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L79", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "tests_test_data_scope_test_row_in_data_scope_self_by_create_by", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L84", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "tests_test_data_scope_test_row_in_data_scope_self_by_owner_field", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L94", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "tests_test_data_scope_test_row_in_data_scope_denied", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L109", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "target": "tests_test_data_scope_test_assert_row_in_data_scope_raises_403", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L119", "weight": 1.0}, {"source": "tests_test_data_scope_rationale_1", "target": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_data_scope_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L1", "weight": 1.0}], "raw_calls": [{"caller_nid": "tests_test_data_scope_test_super_admin_bypass_apply", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L25"}, {"caller_nid": "tests_test_data_scope_test_super_admin_bypass_apply", "callee": "apply_data_scope", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L26"}, {"caller_nid": "tests_test_data_scope_test_super_admin_bypass_apply", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L26"}, {"caller_nid": "tests_test_data_scope_test_super_admin_bypass_apply", "callee": "assert_not_called", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L28"}, {"caller_nid": "tests_test_data_scope_test_scope4_invokes_filter_via_scope_collection", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L32"}, {"caller_nid": "tests_test_data_scope_test_scope4_invokes_filter_via_scope_collection", "callee": "patch", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L34"}, {"caller_nid": "tests_test_data_scope_test_scope4_invokes_filter_via_scope_collection", "callee": "patch", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L37"}, {"caller_nid": "tests_test_data_scope_test_scope4_invokes_filter_via_scope_collection", "callee": "set", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L39"}, {"caller_nid": "tests_test_data_scope_test_scope4_invokes_filter_via_scope_collection", "callee": "patch", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L40"}, {"caller_nid": "tests_test_data_scope_test_scope4_invokes_filter_via_scope_collection", "callee": "apply_data_scope", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L45"}, {"caller_nid": "tests_test_data_scope_test_scope4_invokes_filter_via_scope_collection", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L45"}, {"caller_nid": "tests_test_data_scope_test_scope4_with_owner_field_passes_owner_to_helper", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L50"}, {"caller_nid": "tests_test_data_scope_test_scope4_with_owner_field_passes_owner_to_helper", "callee": "patch", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L52"}, {"caller_nid": "tests_test_data_scope_test_scope4_with_owner_field_passes_owner_to_helper", "callee": "patch", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L55"}, {"caller_nid": "tests_test_data_scope_test_scope4_with_owner_field_passes_owner_to_helper", "callee": "set", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L57"}, {"caller_nid": "tests_test_data_scope_test_scope4_with_owner_field_passes_owner_to_helper", "callee": "patch", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L58"}, {"caller_nid": "tests_test_data_scope_test_scope4_with_owner_field_passes_owner_to_helper", "callee": "apply_data_scope", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L59"}, {"caller_nid": "tests_test_data_scope_test_scope4_with_owner_field_passes_owner_to_helper", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L63"}, {"caller_nid": "tests_test_data_scope_test_scope4_with_owner_field_passes_owner_to_helper", "callee": "assert_called_once", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L67"}, {"caller_nid": "tests_test_data_scope_test_no_role_scopes_returns_empty_query", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L72"}, {"caller_nid": "tests_test_data_scope_test_no_role_scopes_returns_empty_query", "callee": "patch", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L74"}, {"caller_nid": "tests_test_data_scope_test_no_role_scopes_returns_empty_query", "callee": "apply_data_scope", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L75"}, {"caller_nid": "tests_test_data_scope_test_no_role_scopes_returns_empty_query", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L75"}, {"caller_nid": "tests_test_data_scope_test_no_role_scopes_returns_empty_query", "callee": "assert_called", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L76"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_super_admin", "callee": "SimpleNamespace", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L80"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_super_admin", "callee": "row_in_data_scope", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L81"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_super_admin", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L81"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_self_by_create_by", "callee": "SimpleNamespace", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L85"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_self_by_create_by", "callee": "patch", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L87"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_self_by_create_by", "callee": "row_in_data_scope", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L91"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_self_by_create_by", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L91"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_self_by_owner_field", "callee": "SimpleNamespace", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L95"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_self_by_owner_field", "callee": "patch", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L97"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_self_by_owner_field", "callee": "row_in_data_scope", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L102"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_self_by_owner_field", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L103"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_denied", "callee": "SimpleNamespace", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L110"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_denied", "callee": "patch", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L112"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_denied", "callee": "row_in_data_scope", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L116"}, {"caller_nid": "tests_test_data_scope_test_row_in_data_scope_denied", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L116"}, {"caller_nid": "tests_test_data_scope_test_assert_row_in_data_scope_raises_403", "callee": "SimpleNamespace", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L120"}, {"caller_nid": "tests_test_data_scope_test_assert_row_in_data_scope_raises_403", "callee": "patch", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L122"}, {"caller_nid": "tests_test_data_scope_test_assert_row_in_data_scope_raises_403", "callee": "raises", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L126"}, {"caller_nid": "tests_test_data_scope_test_assert_row_in_data_scope_raises_403", "callee": "assert_row_in_data_scope", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L127"}, {"caller_nid": "tests_test_data_scope_test_assert_row_in_data_scope_raises_403", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_data_scope.py", "source_location": "L127"}]}
|