"""Unit tests for response models.""" from src.schemas import PaymentAllocationResponse class TestPaymentAllocationResponse: """Tests for PaymentAllocationResponse model.""" def test_valid_response(self): """Test valid response creation.""" response = PaymentAllocationResponse( statement_period_id=1, statement_period_payment_entity_id=2, allocations_created=5, ledger_adjustments_linked=15, ) assert response.statement_period_id == 1 assert response.statement_period_payment_entity_id == 2 assert response.allocations_created == 5 assert response.ledger_adjustments_linked == 15 def test_zero_allocations(self): """Test response with zero allocations.""" response = PaymentAllocationResponse( statement_period_id=1, statement_period_payment_entity_id=2, allocations_created=0, ledger_adjustments_linked=0, ) assert response.allocations_created == 0 assert response.ledger_adjustments_linked == 0 def test_model_dump(self): """Test model serialization.""" response = PaymentAllocationResponse( statement_period_id=1, statement_period_payment_entity_id=2, allocations_created=3, ledger_adjustments_linked=10, ) data = response.model_dump() assert data == { 'statement_period_id': 1, 'statement_period_payment_entity_id': 2, 'allocations_created': 3, 'ledger_adjustments_linked': 10, }