Unit Tests for CODITECT Priority Queue Router
Tests:
- AgentStatus enum
- AgentCapability dataclass
- Agent dataclass
- LocalAgentRegistry
- AgentDiscoveryService
- PriorityRouter (all strategies)
- IntegratedRouter
Author: CODITECT Framework Version: 1.0.0 Created: January 8, 2026
File: test_priority_router.py
Classes
TestAgentStatus
Test AgentStatus enum
TestRoutingStrategy
Test RoutingStrategy enum
TestRoutingResult
Test RoutingResult enum
TestAgentCapability
Test AgentCapability dataclass
TestAgent
Test Agent dataclass
TestLocalAgentRegistry
Test LocalAgentRegistry
TestAgentDiscoveryServiceLocalMode
Test AgentDiscoveryService in local mode
TestPriorityRouter
Test PriorityRouter with all strategies
TestIntegratedRouter
Test IntegratedRouter
TestHelperFunctions
Test helper functions
Functions
run_tests()
Run all tests with summary
test_status_values()
Test all status values exist
test_status_from_string()
Test creating status from string
test_strategy_values()
Test all strategy values
test_result_values()
Test all result values
test_create_default()
Test creating capability with defaults
test_create_custom()
Test creating capability with custom values
test_to_dict()
Test converting to dictionary
test_from_dict()
Test creating from dictionary
test_create_default()
Test creating agent with defaults
test_load_ratio()
Test load ratio calculation
test_load_ratio_zero_concurrency()
Test load ratio with zero max concurrency
test_is_available()
Test availability check
test_available_slots()
Test available slots calculation
test_has_capability()
Test capability check
Usage
python test_priority_router.py