Orchestrata Ultimate › Tests › Reference › scripts › test_graph_browser

Tests reference — tests/scripts/test_graph_browser.py

Module of tests/scripts, split out because the directory page would be too large.

Prose pending.

tests/scripts/test_graph_browser.py

source · 22 tests · 339 lines

Real-infrastructure tests for scripts/graph_browser.py — the interactive

Kind Name Line Description
function test_api_meta_shape 61 /api/meta returns labels (with counts+colors) and relationship types.
function test_api_nodes_returns_seeds_for_existing_label 82 /api/nodes?label=X returns real seed nodes for a label known to exist.
function test_api_nodes_query_filter_narrows_results 103 The q substring filter narrows the seed set (or returns empty).
function test_api_nodes_unknown_label_returns_400 118 A label that does not exist in the graph is rejected with 400 BEFORE
function test_api_nodes_cypher_injection_attempt_returns_400_and_is_inert 127 A label containing a backtick (attempting to break out of the
function test_api_expand_returns_neighbors_for_real_node 155 /api/expand/{id} returns neighbor nodes + edges for a real, connected node.
function test_api_expand_unknown_node_returns_404 187 A node id that does not exist in the graph returns a 404, not a crash.
function test_api_expand_existing_edgeless_or_any_node_returns_200 195 An existing node returns 200 with real (possibly empty) node/edge lists —
function test_index_serves_html_with_d3_script_tag 215 GET / serves the graph-browser HTML app referencing the local d3 asset.
function test_static_d3_asset_is_served_locally 225 The vendored d3 bundle is served from /static, not a CDN.
function test_resolve_memgraph_uri_uses_env_routing 233 orchgraph uses neo4j:// coordinator routing — the HTTP HA controller
function test_resolve_memgraph_uri_falls_back_to_uris_list 245 An unreachable HA controller falls back to the first MEMGRAPH_URIS entry.
function test_resolve_memgraph_uri_falls_back_to_single_uri_env 254 With no controller URL and no URIS list, falls back to MEMGRAPH_URI.
function test_resolve_memgraph_uri_raises_when_nothing_is_configured 260 With no env vars at all, resolution FAILS rather than guessing.
function test_get_driver_kg_branch_connects 274 graph="kg" routes through the plain create_graph() default resolution.
function test_get_driver_neo4j_alias_connects_same_as_kg 286 graph="neo4j" is the deprecated alias -- must resolve identically to "kg".
function test_normalize_graph_kind_folds_neo4j_onto_kg 298 The deprecated "neo4j" alias normalizes to the canonical "kg".
function test_api_meta_accepts_kg_and_neo4j_alias_identically 305 /api/meta?graph=kg and the deprecated ?graph=neo4j both succeed.
function test_display_name_prefers_name_properties_in_order 316 _display_name picks the first matching candidate property.
function test_display_name_falls_back_to_label_and_id 322 With no matching name-ish property, falls back to Label#id.
function test_trim_props_caps_at_max_props 328 _trim_props caps the returned property dict at the max-props limit.
function test_trim_props_passthrough_when_small 336 Fewer properties than the cap pass through unchanged.