1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-09-23 13:42:40 +01:00

Improve tests with mocker

This commit is contained in:
nvbn
2015-05-07 13:42:52 +02:00
parent 91c1fe414a
commit 2b12b4bfce
4 changed files with 28 additions and 42 deletions

View File

@@ -14,10 +14,8 @@ def test_default(enabled, rules, result):
@pytest.fixture
def load_source(monkeypatch):
mock = Mock()
monkeypatch.setattr('thefuck.conf.load_source', mock)
return mock
def load_source(mocker):
return mocker.patch('thefuck.conf.load_source')
@pytest.fixture