def test_jira_command_ignores_invalid_format(add_re, remove_re): arg_tests = [[], ['foo'], [u'☃']] for args in arg_tests: assert jira.jira_command(None, '#bots', 'me', 'foo', 'bar', args) is None assert not add_re.called assert not remove_re.called # Reset mocks add_re.reset_mock() remove_re.reset_mock()
def test_jira_command_ignores_invalid_format(add_re, remove_re): arg_tests = [ [], ['foo'], [u'☃'] ] for args in arg_tests: assert jira.jira_command(None, '#bots', 'me', 'foo', 'bar', args) is None assert not add_re.called assert not remove_re.called # Reset mocks add_re.reset_mock() remove_re.reset_mock()
def test_jira_command_unknown(add_re, remove_re): jira.jira_command(None, '#bots', 'me', 'foo', 'bar', ['wat', 'foobar']) assert not add_re.called assert not remove_re.called