Skip to content

Commit

Permalink
update integration test with blank since
Browse files Browse the repository at this point in the history
  • Loading branch information
snopoke committed Jun 11, 2019
1 parent c469505 commit 8f79c03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions commcare_export/commcare_minilinq.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ def __call__(self, since, until):

class FormFilterSinceParams(object):
def __call__(self, since, until):
range_expression = {
'gte': since.isoformat()
}
range_expression = {}
if since:
range_expression['gte'] = since.isoformat()

if until:
range_expression['lte'] = until.isoformat()

Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def test_write_to_sql_with_checkpoints_multiple_tables(self, writer, checkpoint_
reader = csv.reader(f)
expected_form_2_data = list(reader)[1:]

_pull_data(writer, checkpoint_manager, 'tests/009b_integration_multiple.xlsx', '2012-01-01', '2012-05-01')
_pull_data(writer, checkpoint_manager, 'tests/009b_integration_multiple.xlsx', None, '2012-05-01')
self._check_checkpoints(caplog, ['forms_1', 'final', 'forms_2', 'final'])
self._check_checkpoints(caplog, ['forms_1', 'forms_1', 'forms_2', 'forms_2'])
self._check_data(writer, expected_form_1_data, 'forms_1')
Expand Down

0 comments on commit 8f79c03

Please sign in to comment.