Orchestrata Ultimate › Tests › Reference › scripts › test_graph_test_preflight

Tests reference — tests/scripts/test_graph_test_preflight.py

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

Prose pending.

tests/scripts/test_graph_test_preflight.py

source · 25 tests · 480 lines

Tests for scripts/graph_test_preflight.py -- validates test Cypher queries

Kind Name Line Description
class TestLoadCachedConstraints 62
method TestLoadCachedConstraints.test_returns_known_uniqueness_constraints 63
class TestFindCypherQueries 82
method TestFindCypherQueries.test_single_line_create_and_create_rel 83
method TestFindCypherQueries.test_multiline_triple_quoted_create_merge_and_create_rel 93
method TestFindCypherQueries.test_no_cypher_returns_empty 107
method TestFindCypherQueries.test_single_quoted_triple_string_also_scanned 111
class TestCheckQueryAgainstConstraints 123
method TestCheckQueryAgainstConstraints.test_skips_non_uniqueness_constraint 124
method TestCheckQueryAgainstConstraints.test_skips_constraint_with_no_labels 138
method TestCheckQueryAgainstConstraints.test_skips_label_mismatch 147
method TestCheckQueryAgainstConstraints.test_skips_when_constrained_property_absent 161
method TestCheckQueryAgainstConstraints.test_merge_is_always_safe 175
method TestCheckQueryAgainstConstraints.test_create_with_static_value_is_high_risk 189
method TestCheckQueryAgainstConstraints.test_create_with_dollar_param_is_medium_risk 206
method TestCheckQueryAgainstConstraints.test_create_with_brace_interpolation_is_medium_risk 221
method TestCheckQueryAgainstConstraints.test_create_with_fstring_prefix_is_medium_risk 236
method TestCheckQueryAgainstConstraints.test_regression_bare_letter_f_no_longer_downgrades_to_medium 251 Real bug found while writing this suite: the original check was
class TestScanFile 281
method TestScanFile.test_file_with_violation 282
method TestScanFile.test_file_without_violation 294
method TestScanFile.test_unreadable_path_returns_empty_list 300
class TestMainOffline 312
method TestMainOffline.test_path_not_a_directory_returns_one 313
method TestMainOffline.test_no_violations_returns_zero 320
method TestMainOffline.test_violations_found_report_and_skip_rules 330
class TestLoadConstraintsFromGraphReal 385
method TestLoadConstraintsFromGraphReal.test_real_success_returns_populated_constraint_dicts 386 The live graph is Memgraph (the Neo4j containers were retired in the
class TestMainNonOfflineReal 417
method TestMainNonOfflineReal.test_real_connection_no_violations 418
class TestConnectionFailureSubprocess 437
method TestConnectionFailureSubprocess.test_dead_neo4j_uri_exits_one_with_error 438
method TestConnectionFailureSubprocess.test_in_process_direct_call_also_exits_one 454