Get ack files only from day before the ack file is received.

Take care of upper and lower case of file names and contents
Add a test for s3 get_list_of_files_by_suffix
This commit is contained in:
venusbb
2018-01-16 09:29:31 +00:00
parent 6a13450bfc
commit f273b23c25
4 changed files with 62 additions and 17 deletions

View File

@@ -1029,20 +1029,18 @@ def test_dao_fetch_monthly_historical_stats_by_template_null_template_id_not_cou
assert len(result) == 1
def mock_s3_get_list_match(bucket_name, subfolder='', suffix=''):
def mock_s3_get_list_match(bucket_name, subfolder='', suffix='', lastModified=None):
if subfolder == '2018-01-11':
return ['NOTIFY.20180111175007.ZIP', 'NOTIFY.20180111175008.ZIP']
print(suffix)
if subfolder == 'root/dispatch':
return ['root/dispatch/NOTIFY.20180111175733.ACK.txt']
def mock_s3_get_list_diff(bucket_name, subfolder='', suffix=''):
def mock_s3_get_list_diff(bucket_name, subfolder='', suffix='', lastModified=None):
if subfolder == '2018-01-11':
return ['NOTIFY.20180111175007.ZIP', 'NOTIFY.20180111175008.ZIP', 'NOTIFY.20180111175009.ZIP',
'NOTIFY.20180111175010.ZIP']
print(suffix)
if subfolder == 'root/dispatch':
return ['root/dispatch/NOTIFY.20180111175733.ACK.txt']