From 509a1f2c2e0407ac944334898991e097a4b61948 Mon Sep 17 00:00:00 2001 From: Athanasius <github@miggy.org> Date: Fri, 19 Mar 2021 14:24:25 +0000 Subject: [PATCH] Rename mock_get_str() to mock_journaldir() --- tests/journal_lock.py/test_journal_lock.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/journal_lock.py/test_journal_lock.py b/tests/journal_lock.py/test_journal_lock.py index 154890d4..b2994eac 100644 --- a/tests/journal_lock.py/test_journal_lock.py +++ b/tests/journal_lock.py/test_journal_lock.py @@ -44,8 +44,8 @@ from journal_lock import JournalLock @pytest.fixture -def mock_get_str(monkeypatch: _pytest_monkeypatch, tmpdir: _pytest_tmpdir) -> py_path_local_LocalPath: - """Fixture for get_str() mock setup.""" +def mock_journaldir(monkeypatch: _pytest_monkeypatch, tmpdir: _pytest_tmpdir) -> py_path_local_LocalPath: + """Fixture for mocking config.get_str('journaldir').""" def get_str(key: str, *, default: str = None) -> str: """Mock config.*Config get_str to provide fake journaldir.""" if key == 'journaldir': @@ -60,9 +60,9 @@ def mock_get_str(monkeypatch: _pytest_monkeypatch, tmpdir: _pytest_tmpdir) -> py yield tmpdir -def test_journal_lock_init(mock_get_str: py_path_local_LocalPath): +def test_journal_lock_init(mock_journaldir: py_path_local_LocalPath): """Test JournalLock instantiation.""" - tmpdir = mock_get_str + tmpdir = mock_journaldir jlock = JournalLock() assert jlock.journal_dir == str(tmpdir)