"""Test for accounting period report serialization.""" from royalties.schemas.accounting_period_report import AccountingPeriodReportSchema from royalties.tests.utils.factories import AccountingPeriodReportFactory def test_accounting_period_report_schema(): """Test accounting period report schema.""" accounting_period_report = AccountingPeriodReportFactory.create() result = AccountingPeriodReportSchema().dump(accounting_period_report) assert ( result['accounting_period_report_id'] == accounting_period_report.accounting_period_report_id ) assert ( result['accounting_period_id'] == accounting_period_report.accounting_period_id ) assert result['report_type'] == accounting_period_report.report_type assert result['report_export_url'] == accounting_period_report.report_export_url