Add docstring for patch_read_file.
This commit is contained in:
parent
b18c1254a4
commit
44a6617184
@ -28,8 +28,9 @@ from qutebrowser.utils import jinja
|
|||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def patch_read_file(monkeypatch):
|
def patch_read_file(monkeypatch):
|
||||||
|
"""pytest fixture to patch utils.read_file."""
|
||||||
def _read_file(path):
|
def _read_file(path):
|
||||||
"""Mocked utils.read_file."""
|
"""A read_file which returns a simple template if the path is right."""
|
||||||
if path == os.path.join('html', 'test.html'):
|
if path == os.path.join('html', 'test.html'):
|
||||||
return """Hello {{var}}"""
|
return """Hello {{var}}"""
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user