Orchestrata Ultimate › Tests › Reference › postman › test_filter
Tests reference — tests/postman/test_filter.py
Module of tests/postman, split out because the directory page would be too large.
Prose pending.
tests/postman/test_filter.py
source · 48 tests · 615 lines
Tests for MessageFilter class.
Covers: postman.filter, postman.types
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestMessageFilterInitialization |
48 | Test MessageFilter initialization. |
| method | TestMessageFilterInitialization.test_init_creates_filter_instance |
51 | Test that MessageFilter can be instantiated. |
| class | TestMatchesSenderPattern |
58 | Test sender pattern matching. |
| method | TestMatchesSenderPattern.test_matches_exact_sender |
61 | Test exact sender match. |
| method | TestMatchesSenderPattern.test_matches_sender_wildcard |
70 | Test sender wildcard pattern. |
| method | TestMatchesSenderPattern.test_matches_sender_question_wildcard |
79 | Test sender question mark wildcard. |
| method | TestMatchesSenderPattern.test_no_match_sender_different |
88 | Test no match when sender is different. |
| method | TestMatchesSenderPattern.test_matches_sender_empty_string |
97 | Test sender pattern with empty sender. |
| method | TestMatchesSenderPattern.test_empty_pattern_against_non_empty_sender |
106 | Test empty pattern against non-empty sender. |
| class | TestMatchesRecipientPattern |
117 | Test recipient pattern matching. |
| method | TestMatchesRecipientPattern.test_matches_exact_recipient |
120 | Test exact recipient match. |
| method | TestMatchesRecipientPattern.test_matches_recipient_wildcard |
129 | Test recipient wildcard pattern. |
| method | TestMatchesRecipientPattern.test_no_match_recipient_different |
138 | Test no match when recipient is different. |
| class | TestMatchesTopicPattern |
148 | Test topic pattern matching (uses recipient field). |
| method | TestMatchesTopicPattern.test_matches_exact_topic |
151 | Test exact topic match. |
| method | TestMatchesTopicPattern.test_matches_topic_wildcard |
160 | Test topic wildcard pattern. |
| method | TestMatchesTopicPattern.test_matches_topic_middle_wildcard |
169 | Test topic pattern with wildcard in the middle. |
| class | TestMatchesContentPattern |
179 | Test content pattern matching. |
| method | TestMatchesContentPattern.test_matches_content_substring |
182 | Test content substring match. |
| method | TestMatchesContentPattern.test_matches_content_wildcard |
191 | Test content wildcard pattern. |
| method | TestMatchesContentPattern.test_matches_content_question_wildcard |
200 | Test content question mark wildcard. |
| method | TestMatchesContentPattern.test_no_match_content_different |
209 | Test no match when content is different. |
| method | TestMatchesContentPattern.test_matches_content_empty_string |
218 | Test content matching with empty content. |
| class | TestMatchesHeadersPattern |
228 | Test headers pattern matching. |
| method | TestMatchesHeadersPattern.test_matches_with_headers_always_false |
231 | Test that header criteria always fail (not supported). |
| method | TestMatchesHeadersPattern.test_matches_multiple_headers_always_false |
241 | Test that multiple header criteria always fail. |
| class | TestMatchesLogicAND |
251 | Test AND logic for multiple criteria. |
| method | TestMatchesLogicAND.test_matches_and_logic_all_true |
254 | Test AND logic with all conditions true. |
| method | TestMatchesLogicAND.test_matches_and_logic_one_false |
268 | Test AND logic with one condition false. |
| method | TestMatchesLogicAND.test_matches_and_logic_all_false |
282 | Test AND logic with all conditions false. |
| class | TestMatchesLogicOR |
297 | Test OR logic for multiple criteria. |
| method | TestMatchesLogicOR.test_matches_or_logic_all_true |
300 | Test OR logic with all conditions true. |
| method | TestMatchesLogicOR.test_matches_or_logic_one_true |
314 | Test OR logic with one condition true. |
| method | TestMatchesLogicOR.test_matches_or_logic_all_false |
328 | Test OR logic with all conditions false. |
| class | TestMatchesNoCriteria |
343 | Test matching with no criteria. |
| method | TestMatchesNoCriteria.test_matches_no_criteria_returns_true |
346 | Test that no criteria matches everything. |
| class | TestCompileFilter |
356 | Test filter compilation. |
| method | TestCompileFilter.test_compile_filter_returns_callable |
359 | Test that compile_filter returns a callable. |
| method | TestCompileFilter.test_compile_filter_matches_correctly |
368 | Test that compiled filter matches correctly. |
| method | TestCompileFilter.test_compile_filter_no_match |
379 | Test that compiled filter returns false for non-matching message. |
| method | TestCompileFilter.test_compile_filter_with_content_pattern |
390 | Test compiled filter with content pattern. |
| method | TestCompileFilter.test_compile_filter_with_or_logic |
401 | Test compiled filter with OR logic. |
| method | TestCompileFilter.test_compile_filter_no_criteria |
415 | Test compiled filter with no criteria matches everything. |
| class | TestComplexFilterCombinations |
427 | Test complex filter combinations. |
| method | TestComplexFilterCombinations.test_complex_wildcard_patterns |
430 | Test complex wildcard patterns across multiple fields. |
| method | TestComplexFilterCombinations.test_complex_or_with_partial_matches |
444 | Test complex OR logic with partial matches. |
| method | TestComplexFilterCombinations.test_complex_and_with_all_wildcards |
458 | Test complex AND logic with all wildcards. |
| method | TestComplexFilterCombinations.test_complex_pattern_no_match |
476 | Test complex pattern that doesn't match. |
| method | TestComplexFilterCombinations.test_edge_case_empty_patterns |
490 | Test edge case with empty patterns. |
| method | TestComplexFilterCombinations.test_case_sensitive_matching |
503 | Test that pattern matching is case-sensitive. |
| method | TestComplexFilterCombinations.test_special_characters_in_patterns |
513 | Test patterns with special characters. |
| method | TestComplexFilterCombinations.test_multiple_criteria_partial_wildcard |
532 | Test multiple criteria with partial wildcards. |
| method | TestComplexFilterCombinations.test_topic_and_recipient_pattern_both_set |
547 | Test when both topic_pattern and recipient_pattern are set. |
| method | TestComplexFilterCombinations.test_content_with_newlines_and_special_chars |
559 | Test content pattern with newlines and special characters. |
| class | TestNegativePaths |
569 | Test negative paths with None envelope, None payload, and wrong types. |
| method | TestNegativePaths.test_none_envelope |
572 | Test that None envelope raises AttributeError. |
| method | TestNegativePaths.test_none_payload |
581 | Test that None payload raises AttributeError. |
| method | TestNegativePaths.test_wrong_type_envelope |
590 | Test that wrong type for envelope raises AttributeError. |
| method | TestNegativePaths.test_wrong_type_payload |
599 | Test that wrong type for payload raises AttributeError. |
| method | TestNegativePaths.test_wrong_type_criteria |
608 | Test that wrong type for criteria raises AttributeError. |