panels.tests package¶
Submodules¶
panels.tests.tests_api_alarmsconfig module¶
-
class
panels.tests.tests_api_alarmsconfig.APITestBase¶ Bases:
object-
authenticate_client_using_token(client, token)¶ Authenticates a selected API Client using a related User token
-
create_user(**kwargs)¶ Creates a user with selected permissions
-
-
class
panels.tests.tests_api_alarmsconfig.AlarmConfigTestSetup¶ Bases:
objectClass to manage the common setup for testing.
-
setCommonUsersAndClients()¶ Add unauthenticated and unauthorized users
-
setTestAlarmConfig()¶ Define the test suite setup
-
-
class
panels.tests.tests_api_alarmsconfig.GetJsonConfigurationFromFile(methodName='runTest')¶ Bases:
panels.tests.tests_api_alarmsconfig.APITestBase,panels.tests.tests_api_alarmsconfig.AlarmConfigTestSetup,django.test.testcases.TestCaseTest suite to test if the api can get a json from a json file
-
setUp()¶ Define the test suite setup
-
target_request_from_client(client)¶
-
test_api_can_get_json_from_file(mock)¶ Test that the api can get a json from a .json file
-
test_api_cannot_allow_request_for_unauthenticated_user()¶ The request should not be allowed for an unauthenticated user
-
-
class
panels.tests.tests_api_alarmsconfig.GetJsonConfigurationFromFileIfKeyDoesNotExist(methodName='runTest')¶ Bases:
panels.tests.tests_api_alarmsconfig.APITestBase,panels.tests.tests_api_alarmsconfig.AlarmConfigTestSetup,django.test.testcases.TestCaseTest suite to test the api can not get a json if key does not exist
-
setUp()¶ Define the test suite setup
-
target_request_from_client(client)¶
-
test_api_cannot_allow_request_for_unauthenticated_user()¶ The request should not be allowed for an unauthenticated user
-
test_api_cannot_get_json_if_the_key_does_not_exist(mock)¶ Test that the api cannot get a json if the key does not exist
-
-
class
panels.tests.tests_api_alarmsconfig.GetJsonConfigurationFromFileIfNotConfigKey(methodName='runTest')¶ Bases:
panels.tests.tests_api_alarmsconfig.APITestBase,panels.tests.tests_api_alarmsconfig.AlarmConfigTestSetup,django.test.testcases.TestCaseTest suite to test the api can not get a json if the key does not belong to a configuration file
-
setUp()¶ Define the test suite setup
-
target_request_from_client(client)¶
-
test_api_cannot_allow_request_for_unauthenticated_user()¶ The request should not be allowed for an unauthenticated user
-
test_api_cannot_get_json_if_the_key_does_not_exist(mock)¶ Test that the api cannot get a json if the key does not belong to a configuration file
-
-
class
panels.tests.tests_api_alarmsconfig.ListAlarmConfig(methodName='runTest')¶ Bases:
panels.tests.tests_api_alarmsconfig.APITestBase,panels.tests.tests_api_alarmsconfig.AlarmConfigTestSetup,django.test.testcases.TestCaseTest suite to test the list request
-
setUp()¶ Define the test suite setup
-
target_request_from_client(client)¶
-
test_api_can_list_the_configurations(mock_location, mock_all_config_files)¶ Test that the api can list the files
-
test_api_cannot_allow_request_for_unauthenticated_user()¶ The request should not be allowed for an unauthenticated user
-
panels.tests.tests_api_files module¶
-
class
panels.tests.tests_api_files.APITestBase¶ Bases:
object-
authenticate_client_using_token(client, token)¶ Authenticates a selected API Client using a related User token
-
create_user(**kwargs)¶ Creates a user with selected permissions
-
-
class
panels.tests.tests_api_files.FileTestSetup¶ Bases:
objectClass to manage the common setup for testing.
-
setCommonUsersAndClients()¶ Add unauthenticated and unauthorized users
-
setTestFilesConfig()¶ Define the test suite setup
-
-
class
panels.tests.tests_api_files.GetJsonFromFile(methodName='runTest')¶ Bases:
panels.tests.tests_api_files.APITestBase,panels.tests.tests_api_files.FileTestSetup,django.test.testcases.TestCaseTest suite to test if the api can get a json from a json file
-
setUp()¶ Define the test suite setup
-
target_request_from_client(client)¶
-
test_api_can_get_json_from_file(mock)¶ Test that the api can get a json from a .json file
-
test_api_cannot_allow_request_for_unauthenticated_user()¶ The request should not be allowed for an unauthenticated user
-
-
class
panels.tests.tests_api_files.GetJsonFromFileIfKeyDoesNotExist(methodName='runTest')¶ Bases:
panels.tests.tests_api_files.APITestBase,panels.tests.tests_api_files.FileTestSetup,django.test.testcases.TestCaseTest suite to test the api can not get a json if key does not exist
-
setUp()¶ Define the test suite setup
-
target_request_from_client(client)¶
-
test_api_cannot_allow_request_for_unauthenticated_user()¶ The request should not be allowed for an unauthenticated user
-
test_api_cannot_get_json_if_the_key_does_not_exist(mock)¶ Test that the api cannot get a json if the key does not exist
-
-
class
panels.tests.tests_api_files.ListFile(methodName='runTest')¶ Bases:
panels.tests.tests_api_files.APITestBase,panels.tests.tests_api_files.FileTestSetup,django.test.testcases.TestCaseTest suite to test the list request
-
setUp()¶ Define the test suite setup
-
target_request_from_client(client)¶
-
test_api_can_list_the_files(mock)¶ Test that the api can list the files
-
test_api_cannot_allow_request_for_unauthenticated_user()¶ The request should not be allowed for an unauthenticated user
-
panels.tests.tests_api_placemarks module¶
-
class
panels.tests.tests_api_placemarks.APITestBase¶ Bases:
object-
authenticate_client_using_token(client, token)¶ Authenticates a selected API Client using a related User token
-
create_user(**kwargs)¶ Creates a user with selected permissions
-
-
class
panels.tests.tests_api_placemarks.PlacemarksTestSetUp¶ Bases:
objectClass to manage the common setup for testing.
-
setCommonUsersAndClients()¶ Add unauthenticated and unauthorized users
-
setTestPlacemarksConfig(mock)¶
-
-
class
panels.tests.tests_api_placemarks.RetrievePadsByGroup(methodName='runTest')¶ Bases:
panels.tests.tests_api_placemarks.APITestBase,panels.tests.tests_api_placemarks.PlacemarksTestSetUp,django.test.testcases.TestCaseTest suite to test the retrieve of pads by group without selecting a group
-
setUp()¶ Define the test suite setup
-
target_request_from_client(client)¶
-
test_api_can_get_pads_by_group_without_group(mock_antennas_to_pad_values, mock_files_location, mock_get_antennas_configurations)¶ Test can retrieve the pads without group in the required format
-
test_api_cannot_allow_request_for_unauthenticated_user()¶ The request should not be allowed for an unauthenticated user
The request should not be allowed for an unauthorized user
-
-
class
panels.tests.tests_api_placemarks.RetrievePadsBySelectedGroup(methodName='runTest')¶ Bases:
panels.tests.tests_api_placemarks.APITestBase,panels.tests.tests_api_placemarks.PlacemarksTestSetUp,django.test.testcases.TestCaseTest suite to test the retrieve of pads according to a selected group
-
setUp()¶ Define the test suite setup
-
target_request_from_client(client)¶
-
test_api_can_get_pads_by_group(mock_antennas_to_pad_values, mock_files_location, mock_get_antennas_configurations)¶ Test can retrieve the pads by group in the required format
-
test_api_cannot_allow_request_for_unauthenticated_user()¶ The request should not be allowed for an unauthenticated user
The request should not be allowed for an unauthorized user
-
panels.tests.tests_interfaces module¶
-
class
panels.tests.tests_interfaces.TestIPanels(methodName='runTest')¶ Bases:
django.test.testcases.TestCaseThis class defines the test suite for the Panels Interfaces
-
setUp()¶ Define the test suite setup
-
test_get_alarm_ids_of_alarm_configs(mock_all_alarm_configs)¶ Test that IPanels.get_alarm_ids_of_alarm_configs returns the alarm_ids
-
test_get_alarms_views_dict_of_alarm_configs(mock_all_alarm_configs)¶ Test that IPanels.get_alarms_views_dict_of_alarm_configs returns the related views
-
panels.tests.tests_models module¶
-
class
panels.tests.tests_models.AlarmConfigAllTestCase(methodName='runTest')¶ Bases:
django.test.testcases.TestCase,panels.tests.tests_models.AlarmConfigTestBaseThis class defines the test suite for the AlarmConfig class tests to get a list with all the configurations from the configuration files
-
setUp()¶ Hook method for setting up the test fixture before exercising it.
-
tests_get_configurations_from_config_files(mock_location, mock_all_config_files)¶
-
-
class
panels.tests.tests_models.AlarmConfigFormatTestCase(methodName='runTest')¶ Bases:
django.test.testcases.TestCase,panels.tests.tests_models.AlarmConfigTestBaseThis class defines the test suite for the AlarmConfig class tests to get a list with all the configurations from a file with content in json format
-
setUp()¶ Hook method for setting up the test fixture before exercising it.
-
tests_get_configurations_from_config_files_with_a_list_format(mock_location, mock_all_config_files)¶
-
tests_get_configurations_from_file_with_a_dictionary_format(mock_location, mock_all_config_files)¶
-
-
class
panels.tests.tests_models.AlarmConfigGetDataFromFileTestCase(methodName='runTest')¶ Bases:
django.test.testcases.TestCase,panels.tests.tests_models.AlarmConfigTestBaseThis class defines the test suite for the AlarmConfig class tests to obtain configuration data from a configuration file
-
setUp()¶ Hook method for setting up the test fixture before exercising it.
-
tests_get_configuration_data_from_file(mock_location, mock_all_config_files)¶
-
tests_get_configurations_from_file(mock_location, mock_all_config_files)¶
-
-
class
panels.tests.tests_models.AlarmConfigGetUpdatedDataFromFileTestCase(methodName='runTest')¶ Bases:
django.test.testcases.TestCase,panels.tests.tests_models.AlarmConfigTestBaseThis class defines the test suite for the AlarmConfig class tests to obtain modified configuration data from a configuration file
-
setUp()¶ Hook method for setting up the test fixture before exercising it.
-
tests_get_configuration_data_from_file(mock_location, mock_all_config_files)¶
-
tests_get_configurations_from_file(mock_location, mock_all_config_files)¶
-
-
class
panels.tests.tests_models.AlarmConfigTestBase¶ Bases:
object-
get_additional_expected_configurations()¶ Additional configurations for the mock_config.json file
-
get_base_expected_configurations()¶ Expected configurations for the mock_list_config.json and mock_dict_config.json files
-
get_files_from_keys(file_keys)¶
-
get_mock_all_files()¶
-
get_mock_config_files()¶
-
get_mock_dict_config_files()¶
-
get_mock_list_config_files()¶
-
-
class
panels.tests.tests_models.PlacemarkGroupModelsTestCase(methodName='runTest')¶ Bases:
django.test.testcases.TestCaseThis class defines the test suite for the Placemark Group model tests
-
setUp()¶ Hook method for setting up the test fixture before exercising it.
-
test_create_group()¶ Test if we can create a type
-
test_delete_group()¶ Test if we can delete a type
-
test_retrieve_group()¶ Test if we can retrieve a type
-
test_update_group()¶ Test if we can update a type
-
-
class
panels.tests.tests_models.PlacemarkTestCase(methodName='runTest')¶ Bases:
django.test.testcases.TestCaseThis class defines the test suite for the Placemark model tests
-
setUp()¶ Hook method for setting up the test fixture before exercising it.
-
test_create_placemark()¶ Test if we can create a placemark
-
test_create_placemark_with_group()¶ Test if we can create a placemark with a group
-
test_delete_placemark()¶ Test if we can delete a placemark
-
test_retrieve_placemark()¶ Test if we can retrieve a placemark
-
test_update_placemark()¶ Test if we can update a placemark
-
-
class
panels.tests.tests_models.PlacemarkTypeModelsTestCase(methodName='runTest')¶ Bases:
django.test.testcases.TestCaseThis class defines the test suite for the Placemark Type model tests
-
setUp()¶ Hook method for setting up the test fixture before exercising it.
-
test_create_type()¶ Test if we can create a type
-
test_delete_type()¶ Test if we can delete a type
-
test_retrieve_type()¶ Test if we can retrieve a type
-
test_update_type()¶ Test if we can update a type
-