def test_run(self): message = 'foo' command_runner = CommandRunner() git_data_getter = GitDataGetter(Fzf(), command_runner) git_data_getter.get_stash_message_from_input = MagicMock( return_value=message) hist_command_runer = HistoryCommandRunner(git_data_getter, command_runner) hist_command_runer.run = MagicMock() stash_message = StashMessage(hist_command_runer, git_data_getter) stash_message.run() hist_command_runer.run.assert_called_once_with( ['git', 'stash', 'push', '-m', message])
def test_run(self): tag = 'foo' tags = [tag] command_runner = CommandRunner() git_data_getter = GitDataGetter(Fzf(), command_runner) git_data_getter.get_tag_names = MagicMock(return_value=tags) hist_command_runer = HistoryCommandRunner(git_data_getter, command_runner) hist_command_runer.run = MagicMock() delete_tag = DeleteTag(hist_command_runer, git_data_getter) delete_tag.run() hist_command_runer.run.assert_called_once_with( ['git', 'tag', '-d', tag])