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:
@@ -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
|
||||
|
Reference in New Issue
Block a user