ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
modulemethodtest nametest descriptiontest initinputexpected output
2
s3list_files_in_prefixtest_list_files_in_prefix_okTests the list_files_in_prefix method for getting the 2 file keys as list on the mocked s3 bucketMock s3 bucket
Upload 2 files to the bucket with the prefix
Create S3BucketConnector test instance
prefixlist containing the 2 file names
3
test_list_files_in_prefix_wrong_prefixTests the list_files_in_prefix method in case of a wrong or not existing prefixMock s3 bucket
Upload 2 files to the bucket with the prefix
Create S3BucketConnector test instance
wrong prefixempty list
4
read_csv_as_dftest_read_csv_as_df_okTests the read_csv_as_df method for reading 1 .csv file from the mocked s3 bucketMock s3 bucket
Upload 1 csv file to the bucket
Create S3BucketConnector test instance
filenameDataFrame with csv file content
5
write_df_to_s3test_write_df_to_s3_emptyTests the write_df_to_s3 method with an empty DataFrame as inputMock s3 bucket
Create S3BucketConnector test instance
empty DataFrameNone
6
test_write_df_to_s3_csvTests the write_df_to_s3 method if writing csv is successfulMock s3 bucket
Create S3BucketConnector test instance
DataFrame + format = "csv"DataFrame as csv on mocked s3
7
test_write_df_to_s3_parquetTests the write_df_to_s3 method if writing parquet is successfulMock s3 bucket
Create S3BucketConnector test instance
DataFrame + format = "parquet"DataFrame as parquet on mocked s3
8
test_write_df_to_s3_wrong_formatTests the write_df_to_s3 method if a not supported format is given as argumentMock s3 bucket
Create S3BucketConnector test instance
DataFrame + wrong formatWrongFormatException
9
meta_processupdate_meta_filetest_update_meta_file_no_meta_fileTests the update_meta_file method when there is no meta fileMock s3 bucket
Create S3BucketConnector test instance
date_list, meta_key, S3BucketConnector with mocked s3meta file created containing the date_list
10
test_update_meta_file_empty_date_listTests the update_meta_file method when the argument extract_date_list is emptyMock s3 bucket
Create S3BucketConnector test instance
empty date_list, meta_key, S3BucketConnector with mocked s3No meta file, log "The dataframe is empty"
11
test_update_meta_file_meta_file_okTests the update_meta_file method when there already a meta fileMock s3 bucket
Create S3BucketConnector test instance
Upload meta file with correct format
date_list, meta_key, S3BucketConnector with mocked s3new meta file with concatenated dates
12
test_update_meta_file_meta_file_wrongTests the update_meta_file method when there is a wrong meta fileMock s3 bucket
Create S3BucketConnector test instance
Upload meta file with wrong format
date_list, meta_key, S3BucketConnector with mocked s3WrongMetaFileException
13
return_date_listtest_return_date_list_no_meta_fileTests the return_date_list method when there is no meta fileMock s3 bucket
Create S3BucketConnector test instance
first_date, meta_key, S3BucketConnector with mocked s3min_date == first_date, date_list from first_date - 1 untill today
14
test_return_date_list_meta_file_okTests the return_date_list method when there is a meta fileMock s3 bucket
Create S3BucketConnector test instance
Upload correct meta file
different cases of first_date, meta_key, S3BucketConnector with mocked s3min_date and date_list according to different inits/inputs
15
test_return_date_list_meta_file_wrongTests the return_date_list method when there is a wrong meta file -> to show how pandas handles itMock s3 bucket
Create S3BucketConnector test instance
Upload meta file with wrong format
first_date, meta_key, S3BucketConnector with mocked s3KeyError
16
test_return_date_list_empty_date_listTests the return_date_list method when there are no dates to be returnedMock s3 bucket
Create S3BucketConnector test instance
Upload correct meta file
first_date that there will be no dates to be processed, meta_key, S3BucketConnector with mocked s3min_date = '2200-01-01', empty date_list
17
xetra_transformerextracttest_extract_no_filesTests the extract method when there are no files to be extractedMock s3 bucket
Create S3BucketConnector test instance
Create XetraETL test instance patching method return_date_list returning an empty list
-empty DataFrame
18
test_extract_filesTests the extract method when there are files to be extractedMock s3 bucket
Create S3BucketConnector test instance
Create XetraETL test instance patching method return_date_list returning a date list
-extracting the dates according to the date list
19
transform_report1test_transform_report1_emptydfTests the transform_report1 method with an empty DataFrame as input argumentCreate XetraETL test instance patching method return_date_listempty DataFrameempty DataFrame
20
test_transform_report1_okTests the transform_report1 method with an DataFrame as input argumentCreate XetraETL test instance patching method return_date_listDataFrameexpected DataFrame
21
loadtest_loadTests the load methodMock s3 bucket
Create XetraETL test instance patching method return_date_list
DataFrame.parquet file on mocket s3 with the DataFrame content
22
etl_report1test_etl_report1Tests the etl_report1 methodMock s3 bucket
Upload source data
Create XetraETL test instance patching method return_date_list
-.parquet file on mocket s3 with the source data content in report 1 format
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100