tests.core package

Submodules

tests.core.test_datareader module

class tests.core.test_datareader.TestDataReader(methodName='runTest')[source]

Bases: TestCase

Class with tests of the DataReader.

test_fetch_as_dataframe_dataframe_memory_error()[source]

Method tests the fetching data as dataframe functionality memory error route.

test_fetch_as_dataframe_dataframe_type_error()[source]

Method tests the fetching data as dataframe functionality type error route.

test_fetch_as_dataframe_dataframe_value_error()[source]

Method tests the fetching data as dataframe functionality value error route.

test_fetch_as_dataframe_invalid_normalized_type()[source]

Method tests the fetching data as dataframe functionality when normalized type is not supported.

test_fetch_as_dataframe_logs_error()[source]

Method tests the error logging functionality during fetching data as dataframe.

test_fetch_as_dataframe_logs_info()[source]

Method tests the information logging functionality during fetching data as dataframe.

test_fetch_as_dataframe_normalize_memory_error()[source]

Method tests the fetching data as dataframe functionality normalization memory error route.

test_fetch_as_dataframe_normalize_type_error()[source]

Method tests the fetching data as dataframe functionality normalization type error route.

test_fetch_as_dataframe_normalize_value_error()[source]

Method tests the fetching data as dataframe functionality normalization value error route.

test_fetch_as_dataframe_success()[source]

Method tests the fetching data as dataframe functionality success route.

test_fetch_as_dicts_logs_error_on_exception()[source]

Method tests error logging functionality during fetching data as dictionaries.

test_fetch_as_dicts_logs_info()[source]

Method tests information logging functionality during fetching data as dictionaries.

test_fetch_as_dicts_memory_error()[source]

Method tests the fetching data as dictionaries functionality memory error route.

test_fetch_as_dicts_success()[source]

Method tests the fetching data as dictionaries functionality success route.

test_fetch_as_dicts_type_error()[source]

Method tests the fetching data as dictionaries functionality type error route.

test_fetch_as_dicts_value_error()[source]

Method tests the fetching data as dictionaries functionality value error route.

test_init()[source]

Method tests the initialization of a class

test_normalize_dict_items()[source]

Method tests the normalization of a dictionary items.

test_normalize_empty_iterable()[source]

Method tests the normalization of an empty object.

test_normalize_firestore_like_object()[source]

Method tests the normalization of a Firestore object.

test_normalize_item_none()[source]

Method tests the normalization of a None object.

test_normalize_none()[source]

Method tests the normalization of a None object.

test_normalize_not_iterable()[source]

Method tests the normalization of an object that is not iterable.

test_normalize_string_iterable_rejected()[source]

Method tests the normalization of a string.

test_normalize_to_dict_not_callable()[source]

Method tests the normalization of a not callable object.

test_normalize_to_dict_raises_exception()[source]

Method tests the normalization functionality behaviour when raising an exception.

test_normalize_to_dict_returns_non_dict()[source]

Method tests the normalization functionality behaviour when returning a non-dict.

test_normalize_unsupported_type()[source]

Method tests the normalization functionality behaviour when unsupported type.

tests.core.test_firestoreconnection module

class tests.core.test_firestoreconnection.TestFirestoreConnection(methodName='runTest')[source]

Bases: TestCase

Class with tests of the FirestoreConnection.

test_certificate_credentials_file_not_found(mock_log_class, mock_certificate)[source]

Method tests the certificate credentials method when it raises FileNotFoundError exception.

test_certificate_credentials_permission_error(mock_log_class, mock_certificate)[source]

Method tests the certificate credentials method when it raises PermissionError exception.

test_certificate_credentials_success(mock_log_class, mock_certificate)[source]

Method tests the certificate credentials method success route.

test_db_client_default_credentials_error(mock_log_class, mock_client)[source]

Method tests the db_client DefaultCredentialsError exception route.

test_db_client_success(mock_log_class, mock_client)[source]

Method tests the db_client success route.

test_get_collection()[source]

Method tests the getting the collection attribute.

test_get_credentials()[source]

Method tests the getting the credentials of firestore connection.

test_get_db()[source]

Method tests the getting the db attribute.

test_get_path()[source]

Method tests the getting the path of firestore connection.

test_get_results()[source]

Method tests the getting the results attribute.

test_init()[source]

Method tests the initialization of a class

test_initialize_firestore_raises_exception(mock_log_class, mock_initialize)[source]

Method tests the initialization method failure route.

test_initialize_firestore_success(mock_log_class, mock_initialize)[source]

Method tests the initialization method success route.

test_save_collection_collection_attribute_error(mock_log_class)[source]

Method tests the save_collection exception route when collection attribute is invalid.

test_save_collection_db_is_none(mock_log_class)[source]

Method tests the save_collection exception route when db is none.

test_save_collection_success(mock_log_class)[source]

Method tests the save_collection success route.

test_set_collection()[source]

Method tests the setting the collection attribute.

test_set_credentials()[source]

Method tests the setting the credentials of firestore connection.

test_set_db()[source]

Method tests the setting the db attribute.

test_set_path()[source]

Method tests the setting the path of firestore connection.

test_set_results()[source]

Method tests the setting the results attribute.

tests.core.test_log module

class tests.core.test_log.TestLog(methodName='runTest')[source]

Bases: TestCase

Class with tests of the Log wrapper.

test_debug_calls_logger(mock_get_logger)[source]
test_error_calls_logger(mock_get_logger)[source]
test_info_calls_logger(mock_get_logger)[source]
test_log_init_creates_logger(mock_get_logger, mock_filehandler, mock_mkdir)[source]
test_warning_calls_logger(mock_get_logger)[source]

Module contents