Commands
This package contains tests of the integreat_cms.core.management.commands
module
Test Duplicate Pages
- tests.core.management.commands.test_duplicate_pages.test_duplicate_pages(settings: SettingsWrapper, load_test_data: None) None [source]
Ensure that pages are really duplicated
- Parameters:
settings (SettingsWrapper) –
load_test_data (None) –
- Return type:
None
- tests.core.management.commands.test_duplicate_pages.test_duplicate_pages_missing_region_slug(settings: SettingsWrapper) None [source]
Ensure that a missing region slug throws an error
- Parameters:
settings (SettingsWrapper) –
- Return type:
None
Test Find Large Files
- tests.core.management.commands.test_find_large_files.test_find_large_files() None [source]
Ensure that finding large files works
- Return type:
None
- tests.core.management.commands.test_find_large_files.test_find_large_files_exceeding_limit() None [source]
Ensure that a too high limit throws an error
- Return type:
None
- tests.core.management.commands.test_find_large_files.test_find_large_files_invalid_limit() None [source]
Ensure that a negative limit throws an error
- Return type:
None
- tests.core.management.commands.test_find_large_files.test_find_large_files_invalid_threshold() None [source]
Ensure that a negative threshold throws an error
- Return type:
None
Test Find Missing Versions
- tests.core.management.commands.test_find_missing_versions.test_find_missing_versions_failure(load_test_data: None) None [source]
Ensure that inconsistencies are listed
- Parameters:
load_test_data (None) –
- Return type:
None
- tests.core.management.commands.test_find_missing_versions.test_find_missing_versions_invalid_model() None [source]
Ensure that an invalid model throws an error
- Return type:
None
Test Fix Internal Links
- tests.core.management.commands.test_fix_internal_links.test_fix_internal_links_commit(load_test_data_transactional: Any | None) None [source]
Ensure that committing changes to the database works as expected
- Parameters:
load_test_data_transactional (Any | None) – The fixture providing the test data (see
load_test_data_transactional()
)- Return type:
None
- tests.core.management.commands.test_fix_internal_links.test_fix_internal_links_dry_run(load_test_data_transactional: Any | None) None [source]
Ensure that dry run works as expected
- Parameters:
load_test_data_transactional (Any | None) – The fixture providing the test data (see
load_test_data_transactional()
)- Return type:
None
- tests.core.management.commands.test_fix_internal_links.test_fix_internal_links_non_existing_region(load_test_data: None) None [source]
Ensure that a non existing region slug throws an error
- Parameters:
load_test_data (None) – The fixture providing the test data (see
load_test_data()
)- Return type:
None
- tests.core.management.commands.test_fix_internal_links.test_fix_internal_links_non_existing_username(load_test_data: None) None [source]
Ensure that a non existing username throws an error
- Parameters:
load_test_data (None) – The fixture providing the test data (see
load_test_data()
)- Return type:
None
Test Hix Bulk
Test Repair Tree
- tests.core.management.commands.test_repair_tree.test_check_broken_tree_fields(load_test_data: None) None [source]
Ensure error is found in faulty test data
- Parameters:
load_test_data (None) –
- Return type:
None
- tests.core.management.commands.test_repair_tree.test_check_clean_tree_fields(load_test_data: None) None [source]
Ensure no errors are found in default test data
- Parameters:
load_test_data (None) –
- Return type:
None
Test Replace Links
- tests.core.management.commands.test_replace_links.test_replace_links_commit(load_test_data_transactional: Any | None) None [source]
Ensure that committing changes to the database works as expected
- Parameters:
load_test_data_transactional (Any | None) – The fixture providing the test data (see
load_test_data_transactional()
)- Return type:
None
- tests.core.management.commands.test_replace_links.test_replace_links_dry_run(load_test_data_transactional: Any | None) None [source]
Ensure that dry run works as expected
- Parameters:
load_test_data_transactional (Any | None) – The fixture providing the test data (see
load_test_data_transactional()
)- Return type:
None
- tests.core.management.commands.test_replace_links.test_replace_links_missing_args() None [source]
Ensure that missing args cause an error
- Return type:
None
- tests.core.management.commands.test_replace_links.test_replace_links_missing_replace() None [source]
Ensure that a missing replace throws an error
- Return type:
None
- tests.core.management.commands.test_replace_links.test_replace_links_non_existing_region(load_test_data: None) None [source]
Ensure that a non existing region slug throws an error
- Parameters:
load_test_data (None) – The fixture providing the test data (see
load_test_data()
)- Return type:
None
- tests.core.management.commands.test_replace_links.test_replace_links_non_existing_username(load_test_data: None) None [source]
Ensure that a non existing username throws an error
- Parameters:
load_test_data (None) – The fixture providing the test data (see
load_test_data()
)- Return type:
None
Test Reset Deepl Budget
- class tests.core.management.commands.test_reset_deepl_budget.datetime_not_first_day[source]
Bases:
object
Fake datetime object where now() is never the first day of the month
Test Send Push Notifications
- tests.core.management.commands.test_send_push_notifications.test_push_notifications_disabled(settings: SettingsWrapper) None [source]
Ensure that disabled push notifications cause an error
- Parameters:
settings (SettingsWrapper) –
- Return type:
None
- tests.core.management.commands.test_send_push_notifications.test_push_notifications_nonexisting_testregion(settings: SettingsWrapper) None [source]
Ensure that an error is caused when the system runs in debug mode but the test region does not exist
- Parameters:
settings (SettingsWrapper) –
- Return type:
None
Test SUMM.AI Bulk
- tests.core.management.commands.test_summ_ai_bulk.test_summ_ai_bulk_disabled(settings: SettingsWrapper, load_test_data: None) None [source]
Ensure that calling when globally disabled throws an error
- Parameters:
settings (SettingsWrapper) –
load_test_data (None) –
- Return type:
None
- tests.core.management.commands.test_summ_ai_bulk.test_summ_ai_bulk_disabled_region(load_test_data: None) None [source]
Ensure that calling when disabled in a region throws an error
- Parameters:
load_test_data (None) –
- Return type:
None
- tests.core.management.commands.test_summ_ai_bulk.test_summ_ai_bulk_missing_args() None [source]
Ensure that missing args cause an error
- Return type:
None
- tests.core.management.commands.test_summ_ai_bulk.test_summ_ai_bulk_missing_username() None [source]
Ensure that a missing username throws an error
- Return type:
None