mirror of
https://github.com/nvbn/thefuck.git
synced 2025-10-30 14:44:05 +00:00
@@ -52,7 +52,7 @@ def test_match(tar_error, filename, script, fixed):
|
||||
@parametrize_script
|
||||
def test_side_effect(tar_error, filename, script, fixed):
|
||||
tar_error(filename)
|
||||
side_effect(Command(script=script.format(filename)), None)
|
||||
side_effect(Command(script=script.format(filename)), None, None)
|
||||
assert(os.listdir('.') == [filename])
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ def test_match(zip_error, script):
|
||||
'unzip foo',
|
||||
'unzip foo.zip'])
|
||||
def test_side_effect(zip_error, script):
|
||||
side_effect(Command(script=script), None)
|
||||
side_effect(Command(script=script), None, None)
|
||||
assert(os.listdir('.') == ['foo.zip'])
|
||||
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ def test_match(ssh_error):
|
||||
def test_side_effect(ssh_error):
|
||||
errormsg, path, reset, known_hosts = ssh_error
|
||||
command = Command('ssh user@host', stderr=errormsg)
|
||||
side_effect(command, None)
|
||||
side_effect(command, None, None)
|
||||
expected = ['123.234.567.890 asdjkasjdakjsd\n', '111.222.333.444 qwepoiwqepoiss\n']
|
||||
assert known_hosts(path) == expected
|
||||
|
||||
|
||||
Reference in New Issue
Block a user