Agent KB_tests_p12 - grisuno/LazyOwn GitHub Wiki
Subsystem: tests (page 12 of 17)
Previous: KB_tests_p11.md
tests/test_metrics.py
- Doc: Tests for
[modules/metrics.py](https://github.com/grisuno/LazyOwn/blob/146a52570ef792d1ec01ec4d3709b0c159990e47/modules/metrics.py). - Layer: testing
- Language: py
- Symbols:
_build_recorder(function, line 35)def _build_recorder(tmp_path)test_legacy_registry_inc_and_render(function, line 42)def test_legacy_registry_inc_and_render()test_recorder_appends_record_line(function, line 57)def test_recorder_appends_record_line(tmp_path)test_recorder_clamps_negative_duration(function, line 83)def test_recorder_clamps_negative_duration(tmp_path)test_summarize_aggregates_by_command(function, line 92)def test_summarize_aggregates_by_command(tmp_path)test_summarize_window_filters_old_records(function, line 124)def test_summarize_window_filters_old_records(tmp_path)test_tail_returns_newest_first(function, line 163)def test_tail_returns_newest_first(tmp_path)test_concurrent_writes_do_not_corrupt(function, line 173)def test_concurrent_writes_do_not_corrupt(tmp_path)test_get_recorder_is_singleton(function, line 202)def test_get_recorder_is_singleton(tmp_path)test_aggregator_handles_empty_iterable(function, line 211)def test_aggregator_handles_empty_iterable()test_aggregator_skips_malformed_records(function, line 220)def test_aggregator_skips_malformed_records()test_p95_uses_nearest_rank(function, line 227)def test_p95_uses_nearest_rank()test_metric_record_to_dict_roundtrip(function, line 234)def test_metric_record_to_dict_roundtrip()worker(function, line 180)def worker(tag)
- Depends on:
modules/metrics.py
tests/test_metrics_aware_selector.py
- Doc: Tests for
MetricsAwareSelectorin[skills/autonomous_daemon.py](https://github.com/grisuno/LazyOwn/blob/146a52570ef792d1ec01ec4d3709b0c159990e47/skills/autonomous_daemon.py). - Layer: testing
- Language: py
- Symbols:
_StubSelector(class, line 37)class _StubSelector(ICommandSelector)_StubMetrics(class, line 54)class _StubMetrics_decision(function, line 71)def _decision(command)test_passthrough_when_wrapped_returns_none(function, line 75)def test_passthrough_when_wrapped_returns_none()test_passthrough_when_insufficient_attempts(function, line 87)def test_passthrough_when_insufficient_attempts()test_filters_when_success_rate_below_threshold(function, line 105)def test_filters_when_success_rate_below_threshold()test_accepts_when_success_rate_at_threshold(function, line 122)def test_accepts_when_success_rate_at_threshold()test_only_filters_named_command_not_whole_decision_object(function, line 141)def test_only_filters_named_command_not_whole_decision_object()test_summary_is_cached_within_ttl(function, line 158)def test_summary_is_cached_within_ttl()test_summary_forwards_window_seconds(function, line 188)def test_summary_forwards_window_seconds()test_zero_window_is_treated_as_unbounded(function, line 201)def test_zero_window_is_treated_as_unbounded()test_decorator_degrades_when_metrics_source_unavailable(function, line 214)def test_decorator_degrades_when_metrics_source_unavailable()test_wrap_chain_leaves_fallback_unwrapped(function, line 230)def test_wrap_chain_leaves_fallback_unwrapped()test_wrap_chain_master_switch_off(function, line 241)def test_wrap_chain_master_switch_off()test_wrap_chain_is_idempotent(function, line 253)def test_wrap_chain_is_idempotent()test_filtering_emits_skip_event(function, line 265)def test_filtering_emits_skip_event(tmp_path, monkeypatch)test_chain_falls_through_to_fallback_when_all_filtered(function, line 298)def test_chain_falls_through_to_fallback_when_all_filtered()__init__(method, line 40)def __init__(self, decision)select(method, line 44)def select(self, target, phase, context)__init__(method, line 57)def __init__(self, by_command)summarize(method, line 62)def summarize(self, window_seconds)fake_clock(function, line 169)def fake_clock()_BrokenSource(class, line 217)class _BrokenSourcesummarize(method, line 218)def summarize(self, window_seconds)
- Depends on:
skills/autonomous_daemon.py
tests/test_migrate_lazyown_generator.py
- Doc: Regression guard for the
cli/commandsmigration generator. - Layer: testing
- Language: py
- Symbols:
_module_all(function, line 27)def _module_all(source)test_generated_module_parses(function, line 57)def test_generated_module_parses()test_all_is_static_and_matches_class_name(function, line 62)def test_all_is_static_and_matches_class_name()test_compound_phase_title_casing(function, line 68)def test_compound_phase_title_casing()test_no_unevaluated_fstring_all_literal(function, line 74)def test_no_unevaluated_fstring_all_literal()test_method_bodies_are_embedded_in_order(function, line 81)def test_method_bodies_are_embedded_in_order()
- Depends on:
scripts/migrate_lazyown.py
tests/test_module_registry.py
- Doc: Tests for modules.module_registry — ModuleInfo, ModuleRegistry, search, summary.
- Layer: testing
- Language: py
- Symbols:
TestClassify(class, line 20)class TestClassifyTestModuleInfo(class, line 36)class TestModuleInfoTestModuleRegistry(class, line 75)class TestModuleRegistryTestFormatFunctions(class, line 185)class TestFormatFunctionstest_known_categories(method, line 21)def test_known_categories(self)test_unknown_category_defaults_to_auxiliary(method, line 27)def test_unknown_category_defaults_to_auxiliary(self)test_empty_string(method, line 31)def test_empty_string(self)test_minimal_construction(method, line 37)def test_minimal_construction(self)test_full_construction(method, line 44)def test_full_construction(self)test_to_dict(method, line 62)def test_to_dict(self)test_repr(method, line 70)def test_repr(self)test_singleton(method, line 76)def test_singleton(self)test_singleton_with_base_dir(method, line 82)def test_singleton_with_base_dir(self)test_initial_state_not_scanned(method, line 87)def test_initial_state_not_scanned(self)test_scan_returns_list(method, line 92)def test_scan_returns_list(self)test_scan_is_idempotent(method, line 99)def test_scan_is_idempotent(self)test_rescan_forces_refresh(method, line 106)def test_rescan_forces_refresh(self)test_search_returns_list(method, line 115)def test_search_returns_list(self)test_search_by_module_type(method, line 121)def test_search_by_module_type(self)test_search_by_category(method, line 127)def test_search_by_category(self)test_get_known_module(method, line 133)def test_get_known_module(self)test_get_unknown_returns_none(method, line 145)def test_get_unknown_returns_none(self)test_summary_returns_counts(method, line 149)def test_summary_returns_counts(self)test_by_type_shorthand(method, line 159)def test_by_type_shorthand(self)test_search_enabled_only_filters_disabled(method, line 164)def test_search_enabled_only_filters_disabled(self)test_format_module_table_empty(method, line 186)def test_format_module_table_empty(self)test_format_module_table_with_data(method, line 190)def test_format_module_table_with_data(self)test_format_module_detail(method, line 201)def test_format_module_detail(self)test_format_module_detail_minimal(method, line 217)def test_format_module_detail_minimal(self)
- Depends on:
modules/module_registry.py
tests/test_moe_rl_swan.py
- Doc: tests/test_moe_rl_swan.py
- Layer: testing
- Language: py
- Symbols:
TestDetectionOracle(class, line 37)class TestDetectionOracleTestMoERouter(class, line 121)class TestMoERouterTestRLTrainer(class, line 223)class TestRLTrainerTestSwanAgent(class, line 340)class TestSwanAgentTestAutonomousDaemonSWAN(class, line 493)class TestAutonomousDaemonSWANTestPolicyDetectionAware(class, line 571)class TestPolicyDetectionAwareTestWorldModelGraph(class, line 616)class TestWorldModelGraphTestMCPRegistration(class, line 675)class TestMCPRegistrationtest_low_risk_dns_query(method, line 38)def test_low_risk_dns_query(self)test_high_risk_mimikatz(method, line 46)def test_high_risk_mimikatz(self)test_critical_risk_combined_credential_tools(method, line 54)def test_critical_risk_combined_credential_tools(self)test_assessment_has_required_fields(method, line 62)def test_assessment_has_required_fields(self)test_is_high_risk_property_consistent_with_probability(method, line 75)def test_is_high_risk_property_consistent_with_probability(self)test_singleton_returns_same_instance(method, line 83)def test_singleton_returns_same_instance(self)test_nmap_is_not_high_risk(method, line 91)def test_nmap_is_not_high_risk(self)test_evil_winrm_is_high_risk(method, line 99)def test_evil_winrm_is_high_risk(self)test_is_critical_risk_property(method, line 107)def test_is_critical_risk_property(self)test_singleton_returns_same_instance(method, line 122)def test_singleton_returns_same_instance(self)test_route_returns_expert_or_raises_gracefully(method, line 130)def test_route_returns_expert_or_raises_gracefully(self)test_ensemble_returns_available_candidates(method, line 143)def test_ensemble_returns_available_candidates(self)test_record_outcome_updates_ema(method, line 154)def test_record_outcome_updates_ema(self, tmp_path)test_performance_bonus_positive_after_success(method, line 164)def test_performance_bonus_positive_after_success(self, tmp_path)test_performance_bonus_penalises_high_detection(method, line 173)def test_performance_bonus_penalises_high_detection(self, tmp_path)test_status_report_contains_experts(method, line 184)def test_status_report_contains_experts(self)test_softmax_deterministic_picks_highest_weight(method, line 193)def test_softmax_deterministic_picks_highest_weight(self)test_encode_state_format(method, line 224)def test_encode_state_format(self)test_select_action_returns_valid_candidate(method, line 236)def test_select_action_returns_valid_candidate(self)test_update_changes_qvalue(method, line 246)def test_update_changes_qvalue(self, tmp_path)test_epsilon_decays_after_update(method, line 269)def test_epsilon_decays_after_update(self, tmp_path)test_detection_penalty_lowers_effective_reward(method, line 281)def test_detection_penalty_lowers_effective_reward(self, tmp_path)test_optimistic_init_for_unseen_actions(method, line 310)def test_optimistic_init_for_unseen_actions(self, tmp_path)test_save_and_reload_persistence(method, line 318)def test_save_and_reload_persistence(self, tmp_path)test_swan_result_dataclass_fields(method, line 341)def test_swan_result_dataclass_fields(self)test_swan_result_failed_is_not_success(method, line 364)def test_swan_result_failed_is_not_success(self)test_outcome_evaluator_success_reward(method, line 380)def test_outcome_evaluator_success_reward(self)test_outcome_evaluator_failed_gives_negative_reward(method, line 399)def test_outcome_evaluator_failed_gives_negative_reward(self)test_outcome_evaluator_high_value_category_bonus(method, line 417)def test_outcome_evaluator_high_value_category_bonus(self)test_mcp_swan_route_returns_valid_json(method, line 438)def test_mcp_swan_route_returns_valid_json(self)test_mcp_swan_status_returns_valid_json(method, line 452)def test_mcp_swan_status_returns_valid_json(self)test_ensemble_result_dataclass_fields(method, line 460)def test_ensemble_result_dataclass_fields(self)test_swan_selector_disabled_by_default(method, line 494)def test_swan_selector_disabled_by_default(self)test_swan_selector_phase_mapping_coverage(method, line 503)def test_swan_selector_phase_mapping_coverage(self)test_cascade_strategy_contains_swan_selector(method, line 511)def test_cascade_strategy_contains_swan_selector(self)test_cascade_strategy_order(method, line 525)def test_cascade_strategy_order(self)test_fallback_selector_never_returns_none(method, line 539)def test_fallback_selector_never_returns_none(self)test_command_decision_source_label(method, line 548)def test_command_decision_source_label(self)test_llm_selector_disabled_without_env(method, line 556)def test_llm_selector_disabled_without_env(self)test_detection_above_threshold_zeroes_reward(method, line 572)def test_detection_above_threshold_zeroes_reward(self)test_low_detection_preserves_positive_reward(method, line 587)def test_low_detection_preserves_positive_reward(self)test_failed_outcome_gives_negative_reward(method, line 602)def test_failed_outcome_gives_negative_reward(self)test_add_relation_and_pivot_candidates(method, line 617)def test_add_relation_and_pivot_candidates(self, tmp_path)test_graph_snapshot_is_serialisable(method, line 634)def test_graph_snapshot_is_serialisable(self, tmp_path)test_auto_relation_on_service_add(method, line 645)def test_auto_relation_on_service_add(self, tmp_path)test_pivot_candidates_sorted_by_centrality(method, line 656)def test_pivot_candidates_sorted_by_centrality(self, tmp_path)test_swan_tools_registered_in_mcp(method, line 676)def test_swan_tools_registered_in_mcp(self)test_hive_tools_registered_in_mcp(method, line 685)def test_hive_tools_registered_in_mcp(self)_ep(function, line 199)def _ep(eid, w)_make_trainer(function, line 285)def _make_trainer(suffix)_result(function, line 421)def _result(task_type)
- Depends on:
modules/detection_oracle.py,modules/moe_router.py,modules/rl_trainer.py,modules/world_model.py,skills/autonomous_daemon.py,skills/lazyown_policy.py,skills/swan_agent.py
tests/test_moe_router_check_regression.py
- Doc: Regression coverage for
modules.moe_router.ExpertAvailabilityChecker._check. - Layer: testing
- Language: py
- Symbols:
test_check_groq_returns_false_without_api_key(function, line 27)def test_check_groq_returns_false_without_api_key(monkeypatch)test_check_groq_returns_true_with_explicit_key(function, line 47)def test_check_groq_returns_true_with_explicit_key()test_check_groq_reads_env_when_arg_empty(function, line 65)def test_check_groq_reads_env_when_arg_empty(monkeypatch)test_check_toposwarm_uses_module_level_os_and_path(function, line 85)def test_check_toposwarm_uses_module_level_os_and_path(tmp_path, monkeypatch)test_check_toposwarm_returns_false_when_dir_absent(function, line 110)def test_check_toposwarm_returns_false_when_dir_absent(tmp_path, monkeypatch)test_check_unknown_backend_is_unavailable(function, line 131)def test_check_unknown_backend_is_unavailable()
- Depends on:
modules/moe_router.py
tests/test_mutation_verification.py
- Doc: Mutation verification contracts.
- Layer: testing
- Language: py
- Symbols:
test_sql_injection_blocked(function, line 19)def test_sql_injection_blocked()test_hmac_compare_digest_used(function, line 27)def test_hmac_compare_digest_used()test_shell_false_in_safe_runner(function, line 41)def test_shell_false_in_safe_runner()test_pickle_removed(function, line 56)def test_pickle_removed()test_no_hardcoded_secrets(function, line 63)def test_no_hardcoded_secrets()
- Depends on:
modules/db.py
tests/test_nethelpers_command_set.py
- Doc: Network helpers command set extraction tests.
- Layer: testing
- Language: py
- Symbols:
_add_repo_root_to_syspath(function, line 32)def _add_repo_root_to_syspath()NethelpersSuiteConfig(class, line 38)class NethelpersSuiteConfig_methods_of(function, line 61)def _methods_of(path, class_name)test_target_is_active_command_set(function, line 73)def test_target_is_active_command_set()test_target_exposes_full_nethelpers_cluster(function, line 82)def test_target_exposes_full_nethelpers_cluster()test_target_phase_metadata(function, line 89)def test_target_phase_metadata()test_source_no_longer_defines_cluster(function, line 95)def test_source_no_longer_defines_cluster()test_registry_registers_target(function, line 101)def test_registry_registers_target()test_no_command_collisions_with_source(function, line 108)def test_no_command_collisions_with_source()
- Depends on:
cli/commands/_base.py,cli/commands/_dormancy.py,cli/commands/misc_migrated.py,cli/commands/nethelpers.py,cli/registry.py
tests/test_no_shell_execution.py
- Doc: Contract tests: no os.system and no manual sys.stdout reassignment.
- Layer: testing
- Language: py
- Symbols:
ScanConfig(class, line 20)class ScanConfig_parse(function, line 64)def _parse(path)find_os_system_calls(function, line 72)def find_os_system_calls(config)find_stdout_assignments(function, line 96)def find_stdout_assignments(config)test_no_os_system_in_production(function, line 124)def test_no_os_system_in_production()test_no_manual_stdout_reassignment(function, line 130)def test_no_manual_stdout_reassignment()test_scanner_detects_a_synthetic_os_system(function, line 136)def test_scanner_detects_a_synthetic_os_system(tmp_path)iter_files(method, line 44)def iter_files(self)
tests/test_nuclei_parser.py
- Doc: Tests for modules/integrations/nuclei_parser.py
- Layer: testing
- Language: py
- Symbols:
TestNucleiFinding(class, line 13)class TestNucleiFindingTestNucleiParserText(class, line 58)class TestNucleiParserTextTestNucleiParserJson(class, line 73)class TestNucleiParserJsonTestSeverityMap(class, line 120)class TestSeverityMapTestMitreTactics(class, line 128)class TestMitreTacticsTestRecommendations(class, line 134)class TestRecommendationstest_fields(method, line 14)def test_fields(self)test_exploit_probability_map(method, line 28)def test_exploit_probability_map(self)test_mitre_tactic(method, line 46)def test_mitre_tactic(self)test_parse_empty(method, line 59)def test_parse_empty(self)test_parse_nuclei_line(method, line 64)def test_parse_nuclei_line(self)test_parse_empty(method, line 74)def test_parse_empty(self)test_parse_json_single_finding(method, line 78)def test_parse_json_single_finding(self)test_parse_json_multiple_findings(method, line 90)def test_parse_json_multiple_findings(self)test_parse_json_array(method, line 99)def test_parse_json_array(self)test_parse_with_cve_classification(method, line 108)def test_parse_with_cve_classification(self)test_critical_is_10(method, line 121)def test_critical_is_10(self)test_info_is_1(method, line 124)def test_info_is_1(self)test_all_tactics_have_ta_prefix(method, line 129)def test_all_tactics_have_ta_prefix(self)test_generate_for_critical(method, line 135)def test_generate_for_critical(self)test_skip_low_severity(method, line 151)def test_skip_low_severity(self)
- Depends on:
modules/integrations/nuclei_parser.py
tests/test_ops_loot_phase.py
- Doc: Tests for unified loot, cred-graph view, and quantitative phase progress.
- Layer: testing
- Language: py
- Symbols:
_seed_loot(function, line 34)def _seed_loot(sessions_dir)_write_world(function, line 46)def _write_world(sessions_dir, world)test_gather_loot_parses_kinds_and_skips_noise(function, line 53)def test_gather_loot_parses_kinds_and_skips_noise(tmp_path)test_loot_entry_value(function, line 65)def test_loot_entry_value()test_resolve_cred_value_precedence(function, line 70)def test_resolve_cred_value_precedence()test_loot_show_renders_table(function, line 85)def test_loot_show_renders_table(tmp_path, capsys)test_loot_show_empty(function, line 94)def test_loot_show_empty(tmp_path, capsys)test_loot_search_hits_and_provenance(function, line 101)def test_loot_search_hits_and_provenance(tmp_path, capsys)test_loot_search_no_match(function, line 115)def test_loot_search_no_match(tmp_path, capsys)test_loot_search_requires_query(function, line 123)def test_loot_search_requires_query(tmp_path, capsys)test_loot_reuse_no_target(function, line 133)def test_loot_reuse_no_target(tmp_path, capsys)test_loot_reuse_no_loot(function, line 141)def test_loot_reuse_no_loot(tmp_path, capsys)test_loot_reuse_excludes_rejected_and_flags_confirmed(function, line 148)def test_loot_reuse_excludes_rejected_and_flags_confirmed(tmp_path, capsys)test_loot_graph_renders_edges(function, line 174)def test_loot_graph_renders_edges(tmp_path, capsys)test_loot_graph_empty(function, line 196)def test_loot_graph_empty(tmp_path, capsys)test_loot_mark_writes_rejected_edge(function, line 206)def test_loot_mark_writes_rejected_edge(tmp_path)test_loot_mark_rejects_bad_outcome(function, line 222)def test_loot_mark_rejects_bad_outcome(tmp_path, capsys)test_loot_mark_unknown_credential(function, line 230)def test_loot_mark_unknown_credential(tmp_path, capsys)test_phase_progress_ranks(function, line 241)def test_phase_progress_ranks(tmp_path)test_phase_progress_completed_override(function, line 262)def test_phase_progress_completed_override(tmp_path)test_phase_progress_os_owned_report_and_loot(function, line 283)def test_phase_progress_os_owned_report_and_loot(tmp_path)test_link_credential_to_failure_edge_and_roundtrip(function, line 310)def test_link_credential_to_failure_edge_and_roundtrip(tmp_path)
- Depends on:
cli/ops_commands.py,modules/world_model.py
tests/test_opsec_scorer.py
- Doc: Tests for modules/opsec_scorer.py
- Layer: testing
- Language: py
- Symbols:
TestOpsecScorer(class, line 13)class TestOpsecScorertest_score_high_noise_command(method, line 14)def test_score_high_noise_command(self)test_score_low_noise_command(method, line 21)def test_score_low_noise_command(self)test_score_unknown_command(method, line 27)def test_score_unknown_command(self)test_score_with_evasion(method, line 33)def test_score_with_evasion(self)test_score_batch(method, line 39)def test_score_batch(self)test_score_to_dict(method, line 45)def test_score_to_dict(self)test_confidence_is_float(method, line 61)def test_confidence_is_float(self)test_mitigations_returned(method, line 67)def test_mitigations_returned(self)test_convenience_function(method, line 72)def test_convenience_function(self)test_all_known_commands_have_mitigations(method, line 77)def test_all_known_commands_have_mitigations(self)test_suggest_mitigations(method, line 85)def test_suggest_mitigations(self)test_target_sensitivity_dc(method, line 90)def test_target_sensitivity_dc(self)
- Depends on:
modules/opsec_scorer.py
tests/test_opsec_scorer_consolidated.py
- Doc: Consolidated OPSEC scorer contract tests (SDD/TDD/BDD).
- Layer: testing
- Language: py
- Symbols:
TestSharedRiskMapping(class, line 29)class TestSharedRiskMappingTestRiskLevelAndGate(class, line 59)class TestRiskLevelAndGateTestOpsecScorerV2(class, line 78)class TestOpsecScorerV2TestBackwardCompatibility(class, line 140)class TestBackwardCompatibilitytest_risk_buckets_respect_thresholds(method, line 30)def test_risk_buckets_respect_thresholds(self)test_risk_label_matches_bucket(method, line 40)def test_risk_label_matches_bucket(self)test_risk_level_matches_bucket(method, line 46)def test_risk_level_matches_bucket(self)test_string_and_enum_labels_are_consistent(method, line 52)def test_string_and_enum_labels_are_consistent(self)test_enum_values(method, line 60)def test_enum_values(self)test_gate_mapping(method, line 70)def test_gate_mapping(self)test_assess_returns_gated_score(method, line 79)def test_assess_returns_gated_score(self)test_mimikatz_is_high_critical(method, line 87)def test_mimikatz_is_high_critical(self)test_ping_is_allow(method, line 99)def test_ping_is_allow(self)test_should_allow_returns_tuple(method, line 105)def test_should_allow_returns_tuple(self)test_trend_insufficient_data(method, line 111)def test_trend_insufficient_data(self)test_trend_after_scoring(method, line 115)def test_trend_after_scoring(self)test_mitigations_generated(method, line 123)def test_mitigations_generated(self)test_alternatives_for_mimikatz(method, line 128)def test_alternatives_for_mimikatz(self)test_unknown_command_uses_default_profile(method, line 133)def test_unknown_command_uses_default_profile(self)test_v1_score_returns_string_risk(method, line 141)def test_v1_score_returns_string_risk(self)test_opsec_context_defaults(method, line 147)def test_opsec_context_defaults(self)test_risk_profiles_shared_table_intact(method, line 154)def test_risk_profiles_shared_table_intact(self)
- Depends on:
modules/opsec_scorer.py
tests/test_packaging.py
- Doc: Packaging and project-foundation tests.
- Layer: testing
- Language: py
- Symbols:
_read_text(function, line 25)def _read_text(path)_load_toml(function, line 29)def _load_toml(path)_load_yaml(function, line 34)def _load_yaml(path)TestConfigDeduplication(class, line 39)class TestConfigDeduplicationTestPyProjectToml(class, line 98)class TestPyProjectTomlTestSetupPy(class, line 154)class TestSetupPyTestRequirementsDev(class, line 193)class TestRequirementsDevTestPreCommitConfig(class, line 213)class TestPreCommitConfigTestCIWorkflows(class, line 242)class TestCIWorkflowsTestGitIgnore(class, line 284)class TestGitIgnoreTestRequirementsLock(class, line 303)class TestRequirementsLockTestInstallScript(class, line 343)class TestInstallScriptTestSourceFilesParse(class, line 370)class TestSourceFilesParsetest_config_class_defined_exactly_once_in_core(method, line 46)def test_config_class_defined_exactly_once_in_core(self)test_config_class_not_redefined_in_utils(method, line 52)def test_config_class_not_redefined_in_utils(self)_run_in_subprocess(method, line 59)def _run_in_subprocess(snippet)test_config_attribute_access_works(method, line 74)def test_config_attribute_access_works(self)test_config_getitem_returns_value(method, line 83)def test_config_getitem_returns_value(self)test_config_getitem_returns_none_for_missing_key(method, line 89)def test_config_getitem_returns_none_for_missing_key(self)pyproject(method, line 102)def pyproject(self)test_parses(method, line 105)def test_parses(self, pyproject)test_has_no_typo_dependency(method, line 108)def test_has_no_typo_dependency(self, pyproject)test_does_not_list_stdlib_ast_as_dep(method, line 113)def test_does_not_list_stdlib_ast_as_dep(self, pyproject)test_lists_flask_wtf_correctly(method, line 117)def test_lists_flask_wtf_correctly(self, pyproject)test_does_not_list_broken_docx(method, line 121)def test_does_not_list_broken_docx(self, pyproject)test_has_ml_optional_dependencies(method, line 126)def test_has_ml_optional_dependencies(self, pyproject)test_has_dev_optional_dependencies(method, line 132)def test_has_dev_optional_dependencies(self, pyproject)test_has_ruff_section(method, line 138)def test_has_ruff_section(self, pyproject)test_has_pytest_section(method, line 142)def test_has_pytest_section(self, pyproject)test_has_mypy_section(method, line 146)def test_has_mypy_section(self, pyproject)test_has_bandit_section(method, line 150)def test_has_bandit_section(self, pyproject)setup_tree(method, line 163)def setup_tree(self)setup_text(method, line 167)def setup_text(self)test_parses(method, line 170)def test_parses(self, setup_tree)test_calls_setup(method, line 173)def test_calls_setup(self, setup_tree)test_does_not_duplicate_dependencies(method, line 181)def test_does_not_duplicate_dependencies(self, setup_text)test_no_typo_dep(method, line 186)def test_no_typo_dep(self, setup_text)test_no_stdlib_ast_dep(method, line 189)def test_no_stdlib_ast_dep(self, setup_text)deps(method, line 197)def deps(self)test_lists_tool(method, line 208)def test_lists_tool(self, deps, tool)cfg(method, line 217)def cfg(self)test_parses(method, line 220)def test_parses(self, cfg)test_has_ruff_repo(method, line 225)def test_has_ruff_repo(self, cfg)test_has_detect_secrets_repo(method, line 229)def test_has_detect_secrets_repo(self, cfg)test_has_core_hygiene_hooks(method, line 233)def test_has_core_hygiene_hooks(self, cfg)lint_wf(method, line 246)def lint_wf(self)test_wf(method, line 250)def test_wf(self)security_wf(method, line 254)def security_wf(self)test_lint_workflow_has_ruff_and_mypy_jobs(method, line 257)def test_lint_workflow_has_ruff_and_mypy_jobs(self, lint_wf)test_test_workflow_runs_pytest(method, line 262)def test_test_workflow_runs_pytest(self, test_wf)test_security_workflow_has_three_jobs(method, line 267)def test_security_workflow_has_three_jobs(self, security_wf)test_workflow_triggers_on_push_and_pr(method, line 276)def test_workflow_triggers_on_push_and_pr(self, wf_path)patterns(method, line 288)def patterns(self)test_pattern_present(method, line 299)def test_pattern_present(self, patterns, pattern)_entries(method, line 308)def _entries(name)_names(method, line 316)def _names(entries)test_core_lock_exists_and_pinned(method, line 319)def test_core_lock_exists_and_pinned(self)test_core_lock_has_python_docx_not_broken_docx(method, line 325)def test_core_lock_has_python_docx_not_broken_docx(self)test_core_lock_is_cross_platform(method, line 330)def test_core_lock_is_cross_platform(self)test_ml_lock_exists_pinned_with_torch(method, line 335)def test_ml_lock_exists_pinned_with_torch(self)text(method, line 347)def text(self)test_uses_strict_mode(method, line 350)def test_uses_strict_mode(self, text)test_does_not_install_stdlib_ast(method, line 353)def test_does_not_install_stdlib_ast(self, text)test_does_not_install_broken_docx(method, line 358)def test_does_not_install_broken_docx(self, text)test_installs_from_pinned_lock(method, line 363)def test_installs_from_pinned_lock(self, text)test_no_absolute_modules_ext_path(method, line 366)def test_no_absolute_modules_ext_path(self, text)test_parses(method, line 374)def test_parses(self, filename)
tests/test_palette_overlay.py
- Doc: Tests for cli/palette_overlay.py.
- Layer: testing
- Language: py
- Symbols:
_fake_index(function, line 24)def _fake_index()test_rows_returns_all_commands_when_query_empty(function, line 36)def test_rows_returns_all_commands_when_query_empty()test_rows_filter_by_substring(function, line 44)def test_rows_filter_by_substring()test_rows_rank_recents_above_substrings(function, line 52)def test_rows_rank_recents_above_substrings()test_rows_respect_max_rows(function, line 65)def test_rows_respect_max_rows()test_build_state_returns_none_when_index_missing(function, line 73)def test_build_state_returns_none_when_index_missing(monkeypatch)test_launch_overlay_uses_runner_for_tests(function, line 79)def test_launch_overlay_uses_runner_for_tests()test_truncate_summary_uses_truncation_suffix(function, line 90)def test_truncate_summary_uses_truncation_suffix()test_set_query_strips_whitespace(function, line 106)def test_set_query_strips_whitespace()runner(function, line 83)def runner(context)
- Depends on:
cli/palette_overlay.py
tests/test_payload_factory.py
- Doc: Tests for modules.payload_factory — PayloadFactory, PayloadTemplate, format conversion.
- Layer: testing
- Language: py
- Symbols:
TestPayloadTemplate(class, line 21)class TestPayloadTemplateTestReverseShellPayload(class, line 39)class TestReverseShellPayloadTestWindowsReverseShellPayload(class, line 64)class TestWindowsReverseShellPayloadTestPayloadFactory(class, line 74)class TestPayloadFactoryTestFormatPayloadTable(class, line 168)class TestFormatPayloadTabletest_abstract_cannot_instantiate(method, line 22)def test_abstract_cannot_instantiate(self)test_concrete_subclass(method, line 27)def test_concrete_subclass(self)test_bash_default(method, line 40)def test_bash_default(self)test_nc_shell(method, line 47)def test_nc_shell(self)test_python_shell(method, line 52)def test_python_shell(self)test_unknown_shell_type_falls_back_to_bash(method, line 58)def test_unknown_shell_type_falls_back_to_bash(self)test_generates_powershell(method, line 65)def test_generates_powershell(self)test_list_all(method, line 75)def test_list_all(self)test_list_filter_by_platform(method, line 82)def test_list_filter_by_platform(self)test_get_existing_payload(method, line 89)def test_get_existing_payload(self)test_get_nonexistent_returns_none(method, line 95)def test_get_nonexistent_returns_none(self)test_generate_native_payload(method, line 99)def test_generate_native_payload(self)test_register_custom(method, line 106)def test_register_custom(self)test_format_raw(method, line 118)def test_format_raw(self)test_format_hex(method, line 124)def test_format_hex(self)test_format_base64(method, line 130)def test_format_base64(self)test_format_c(method, line 138)def test_format_c(self)test_format_python(method, line 144)def test_format_python(self)test_list_formats(method, line 150)def test_list_formats(self)test_fallback_to_msfvenom_when_not_found(method, line 161)def test_fallback_to_msfvenom_when_not_found(self)test_empty_list(method, line 169)def test_empty_list(self)test_formats_list(method, line 173)def test_formats_list(self)test_multiple_payloads_aligned(method, line 182)def test_multiple_payloads_aligned(self)MinimalPayload(class, line 30)class MinimalPayload(PayloadTemplate)CustomPayload(class, line 109)class CustomPayload(PayloadTemplate)generate(method, line 31)def generate(self)generate(method, line 110)def generate(self)
- Depends on:
modules/payload_factory.py
Next: KB_tests_p13.md