def test_get_new_command(mocker): mock = mocker.patch('subprocess.Popen') mock.return_value.stdout = BytesIO(b'serve \nbuild \ndefault \n') command = Command('gulp srve', output('srve')) assert get_new_command(command) == ['gulp serve', 'gulp default']
def test_get_new_command(mocker): mocker.patch("thefuck.rules.gulp_not_task.get_gulp_tasks", return_value=["serve", "build", "default"]) command = Command("gulp srve", stdout("srve")) assert get_new_command(command) == ["gulp serve", "gulp default"]
def test_get_new_command(mocker): mocker.patch('thefuck.rules.gulp_not_task.get_gulp_tasks', return_value=[ 'serve', 'build', 'default']) command = Command('gulp srve', stdout('srve')) assert get_new_command(command, None) == 'gulp serve'
def test_get_new_command(mocker): mock = mocker.patch("subprocess.Popen") mock.return_value.stdout = BytesIO(b"serve \nbuild \ndefault \n") command = Command("gulp srve", output("srve")) assert get_new_command(command) == ["gulp serve", "gulp default"]
def test_get_new_command(mocker): mocker.patch('thefuck.rules.gulp_not_task.get_gulp_tasks', return_value=['serve', 'build', 'default']) command = Command('gulp srve', stdout('srve')) assert get_new_command(command) == ['gulp serve', 'gulp default']