1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-13 22:28:33 +00:00

Added compatibility with tests and fixed bad file name

This commit is contained in:
atrakh 2015-05-05 23:09:43 -04:00
parent 158161359a
commit 809b5aa0c7
2 changed files with 3 additions and 3 deletions

View File

@ -1,9 +1,9 @@
from mock import patch, Mock
from thefuck.rules.no_command import match, get_new_command
from thefuck.rules.z_no_command import match, get_new_command
def test_match():
with patch('thefuck.rules.no_command._get_all_bins',
with patch('thefuck.rules.z_no_command._get_all_bins',
return_value=['vim', 'apt-get']):
assert match(Mock(stderr='vom: not found', script='vom file.py'), None)
assert not match(Mock(stderr='qweqwe: not found', script='qweqwe'), None)
@ -11,7 +11,7 @@ def test_match():
def test_get_new_command():
with patch('thefuck.rules.no_command._get_all_bins',
with patch('thefuck.rules.z_no_command._get_all_bins',
return_value=['vim', 'apt-get']):
assert get_new_command(
Mock(stderr='vom: not found',