def test_it_doesnt_specify_log_start_with_no_identifier(self): with mock.patch('releases.subprocess') as subprocess: subprocess.check_output.return_value = u"The log".encode('utf-8') assert get_raw_git_log(None) == u"The log" args, kwargs = subprocess.check_output.call_args command = args[0] assert len(command) == 3
def tests_it_calls_git_log_with_the_supplied_identifier(self): with mock.patch('releases.subprocess') as subprocess: subprocess.check_output.return_value = u"The log".encode('utf-8') assert get_raw_git_log('abcde') == u"The log" args, kwargs = subprocess.check_output.call_args command = args[0] assert command[3].startswith('abcde')