Orchestrata Ultimate › Tests › Reference › scripts › test_graph_query_cypher

Tests reference — tests/scripts/test_graph_query_cypher.py

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

Prose pending.

tests/scripts/test_graph_query_cypher.py

source · 25 tests · 473 lines

Tests for the cypher subcommand of scripts/graph_query.py.

Kind Name Line Description
function test_id 58 Unique per-test project id (matches tests/knowledge_graph/conftest.py).
class TestCypherParser 86
method TestCypherParser.test_defaults 87
method TestCypherParser.test_all_flags 95
method TestCypherParser.test_missing_cypher_positional_exits 111
class TestLooksLikeWriteQuery 121
method TestLooksLikeWriteQuery.test_detects_write_keywords 138
method TestLooksLikeWriteQuery.test_no_false_positive_on_readonly_queries 150
method TestLooksLikeWriteQuery.test_write_keyword_inside_string_literal_does_not_trigger 153
method TestLooksLikeWriteQuery.test_write_keyword_inside_comment_does_not_trigger 159
method TestLooksLikeWriteQuery.test_write_keyword_as_real_clause_after_comment_still_triggers 163
class TestCmdCypherWriteRejection 173
method TestCmdCypherWriteRejection.test_write_clause_rejected_without_allow_writes 184
method TestCmdCypherWriteRejection.test_rejection_message_mentions_allow_writes_flag 189
method TestCmdCypherWriteRejection.test_main_exits_one_with_error_on_write_rejection 196
class TestCmdCypherReadOnly 210
method TestCmdCypherReadOnly.test_simple_count_query 211
method TestCmdCypherReadOnly.test_params_are_bound 221
method TestCmdCypherReadOnly.test_invalid_params_json_raises 235
method TestCmdCypherReadOnly.test_params_must_be_json_object 242
method TestCmdCypherReadOnly.test_main_success_path_exits_zero 249
class TestCmdCypherAllowWrites 262
method TestCmdCypherAllowWrites.test_allow_writes_creates_a_real_node 263
method TestCmdCypherAllowWrites.test_without_allow_writes_the_create_never_reaches_the_db 294
class TestServerSideReadOnlyEnforcement 324
method TestServerSideReadOnlyEnforcement.test_execute_read_rejects_a_real_write 325
method TestServerSideReadOnlyEnforcement.test_execute_write_permits_the_same_write 333
class TestProjectScopeIsolation 358
method TestProjectScopeIsolation.test_project_prefix_scoping_excludes_the_other_project 386
method TestProjectScopeIsolation.test_omitting_project_returns_both_seeded_nodes_unscoped 407
method TestProjectScopeIsolation.test_explicit_user_params_override_project_prefix_binding 432
method TestProjectScopeIsolation.test_project_and_project_prefix_params_both_bound 457