"""Unit tests for reference_flowthrough_calculation schema.""" from abacus_contract.schemas.reference_flowthrough_calculation \ import ReferenceFlowthroughCalculationSchema from tests.utils.factories import ReferenceFlowthroughCalculationFactory def test_reference_flowthrough_calculation_schema(): """Test reference_flowthrough_calculation schema.""" mock_reference_flowthrough_calculation = \ ReferenceFlowthroughCalculationFactory.create() res = ReferenceFlowthroughCalculationSchema().dump( mock_reference_flowthrough_calculation ) assert res == { 'reference_flowthrough_calculation_id': mock_reference_flowthrough_calculation.reference_flowthrough_calculation_id, # noqa E501 'flowthrough_calculation_name': mock_reference_flowthrough_calculation.flowthrough_calculation_name, 'flowthrough_calculation': mock_reference_flowthrough_calculation.flowthrough_calculation, 'flowthrough_calculation_example': mock_reference_flowthrough_calculation.flowthrough_calculation_example, 'flowthrough_calculation_example_summary': mock_reference_flowthrough_calculation.flowthrough_calculation_example_summary # noqa E501 }