Orchestrata Ultimate › Tests › Reference › postman › test_postman_stores

Tests reference — tests/postman/test_postman_stores.py

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

Prose pending.

tests/postman/test_postman_stores.py

source · 22 tests · 724 lines

Comprehensive tests for MessageStore and ReceiptStore.

Covers: postman.message_store, postman.receipt_store, postman.types

Kind Name Line Description
class TestMessageStore 37 Test MessageStore SQLite and Redis integration.
method TestMessageStore.test_init_creates_sqlite_tables 40 Test that initialization creates SQLite database and tables.
method TestMessageStore.test_store_and_retrieve_message 66 Test storing and retrieving a message (SQLite only).
method TestMessageStore.test_store_and_retrieve_message_preserves_compressed_and_size_bytes 103 Restored MessagePayload fields (compressed, size_bytes) round-trip
method TestMessageStore.test_retrieve_nonexistent_message 133 Test retrieving a message that doesn't exist.
method TestMessageStore.test_delete_stored_message 144 Test deleting a stored message.
method TestMessageStore.test_delete_nonexistent_message 175 Test deleting a message that doesn't exist returns False.
method TestMessageStore.test_query_by_sender 186 Test querying messages by sender.
method TestMessageStore.test_query_by_recipient 217 Test querying messages by recipient.
method TestMessageStore.test_query_by_time_range 248 Test querying messages by time range.
method TestMessageStore.test_query_with_limit 291 Test querying messages with limit.
method TestMessageStore.test_cleanup_old_messages 313 Test cleaning up old messages.
method TestMessageStore.test_get_stats 356 Test getting storage statistics.
method TestMessageStore.test_store_multiple_messages_query_various_filters 398 Test storing multiple messages and querying with various filters.
class TestReceiptStore 455 Test ReceiptStore SQLite and Redis integration.
method TestReceiptStore.test_init_creates_tables 458 Test that initialization creates SQLite database and tables.
method TestReceiptStore.test_store_and_get_receipt 481 Test storing and retrieving a receipt.
method TestReceiptStore.test_get_receipts_nonexistent_message 513 Test getting receipts for a non-existent message returns empty list.
method TestReceiptStore.test_query_receipts_by_recipient 523 Test querying receipts by recipient.
method TestReceiptStore.test_query_receipts_by_time_range 557 Test querying receipts by time range.
method TestReceiptStore.test_expire_old_receipts 598 Test expiring old receipts.
method TestReceiptStore.test_multiple_receipts_same_message 642 Test storing multiple receipts for the same message.
method TestReceiptStore.test_receipt_with_error_message 678 Test storing receipt with error message.
method TestReceiptStore.test_query_with_limit 704 Test querying receipts with limit.