Skip to content
Snippets Groups Projects
Commit 1abf820d authored by Anne Philipp's avatar Anne Philipp
Browse files

added fail test for get_command_line method

parent 96e15333
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,11 @@ class TestTools(object): ...@@ -44,6 +44,11 @@ class TestTools(object):
def test_anystr_none_or_str(self): def test_anystr_none_or_str(self):
assert 'test' == none_or_str('test') assert 'test' == none_or_str('test')
def test_fail_get_cmdline_arguments(self):
sys.argv = ['dummy.py', '--wrong=1']
with pytest.raises(SystemExit):
results = get_cmdline_arguments()
def test_default_get_cmdline_arguments(self): def test_default_get_cmdline_arguments(self):
cmd_dict_control = {'start_date':None, cmd_dict_control = {'start_date':None,
'end_date':None, 'end_date':None,
...@@ -69,7 +74,6 @@ class TestTools(object): ...@@ -69,7 +74,6 @@ class TestTools(object):
assert cmd_dict_control == vars(results) assert cmd_dict_control == vars(results)
def test_input_get_cmdline_arguments(self): def test_input_get_cmdline_arguments(self):
cmd_dict_control = {'start_date':'20180101', cmd_dict_control = {'start_date':'20180101',
'end_date':'20180101', 'end_date':'20180101',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment