CMS

This package contains tests of the integreat_cms.cms app

Test Duplicate Regions

tests.cms.test_duplicate_regions.test_duplicate_regions(load_test_data_transactional: None, admin_client: Client) None[source]

Test whether duplicating regions works as expected

Parameters:
Return type:

None

tests.cms.test_duplicate_regions.test_duplicate_regions_no_translations(load_test_data_transactional: None, admin_client: Client) None[source]

Test whether duplicating regions works as expected when disabling the duplication of translations

Parameters:
Return type:

None

Test Language

tests.cms.test_language.test_create_new_language_node(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_language.test_delete_language_node(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_language.test_move_language_node(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_language.test_update_language_node(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

Test Login

tests.cms.test_login.test_login_failure(load_test_data: None, client: Client, settings: SettingsWrapper, username: str) None[source]

Test whether login with incorrect credentials does not work

Parameters:
  • load_test_data (None) – The fixture providing the test data (see load_test_data())

  • client (Client) – The fixture providing the an unauthenticated user client (see client)

  • settings (SettingsWrapper) – The Django settings (see settings)

  • username (str) – The username/email to use for login

Return type:

None

tests.cms.test_login.test_login_success(load_test_data: None, client: Client, settings: SettingsWrapper, username: str) None[source]

Test whether login via username & email works as expected

Parameters:
  • load_test_data (None) – The fixture providing the test data (see load_test_data())

  • client (Client) – The fixture providing the an unauthenticated user client (see client)

  • settings (SettingsWrapper) – The Django settings (see settings)

  • username (str) – The username/email to use for login

Return type:

None

Test Media Library

tests.cms.test_media_library.test_create_directory(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_media_library.test_delete_directory(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_media_library.test_delete_file(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_media_library.test_directory_path(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_media_library.test_edit_directory(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_media_library.test_edit_file(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_media_library.test_get_directory_content(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_media_library.test_get_file_usages(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_media_library.test_get_search_result(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_media_library.test_move_file(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_media_library.test_replace_file(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

tests.cms.test_media_library.test_upload_file(load_test_data: None, login_role_user: tuple[Client, str]) None[source]
Parameters:
Return type:

None

Test Page Filters

tests.cms.test_page_filters.test_page_filters(load_test_data: None, admin_client: Client) None[source]

Test whether duplicating regions works as expected

Parameters:
  • load_test_data (None) – The fixture providing the test data (see load_test_data())

  • admin_client (Client) – The fixture providing the logged in admin

Return type:

None