PDF
This package contains tests for the PDF export of both the integreat_cms.cms
and the integreat_cms.api
app
Test PDF Export
- tests.pdf.test_pdf_export.test_pdf_export(load_test_data: None, client: Client, admin_client: Client, language_slug: str, page_ids: list[int], url: str, expected_filename: str) None [source]
Test whether the PDF export works as expected
- Parameters:
load_test_data (None) – The fixture providing the test data (see
load_test_data()
)client (Client) – The fixture providing the anonymous user
admin_client (Client) – The fixture providing the logged in admin
language_slug (str) – The language slug of this export
url (str) – The url query param for the API request
expected_filename (str) – What filename to expect
- Return type:
None
- tests.pdf.test_pdf_export.test_pdf_export_invalid(load_test_data: None, client: Client, admin_client: Client) None [source]
Test whether the PDF export throws the correct errors
- Parameters:
load_test_data (None) – The fixture providing the test data (see
load_test_data()
)client (Client) – The fixture providing the anonymous user
admin_client (Client) – The fixture providing the logged in admin
- Return type:
None