fix(test_aurblup): use correct type hint for tmpdir

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-11-30 23:24:42 -08:00
parent fccd8b63d2
commit 043ac7fe92
No known key found for this signature in database
GPG key ID: F7E46DED420788F3

View file

@ -2,6 +2,7 @@ import tempfile
from unittest import mock from unittest import mock
import py
import pytest import pytest
from aurweb import config, db from aurweb import config, db
@ -17,12 +18,12 @@ def tempdir() -> str:
@pytest.fixture @pytest.fixture
def alpm_db(tempdir: str) -> AlpmDatabase: def alpm_db(tempdir: py.path.local) -> AlpmDatabase:
yield AlpmDatabase(tempdir) yield AlpmDatabase(tempdir)
@pytest.fixture(autouse=True) @pytest.fixture(autouse=True)
def setup(db_test, alpm_db: AlpmDatabase, tempdir: str) -> None: def setup(db_test, alpm_db: AlpmDatabase, tempdir: py.path.local) -> None:
config_get = config.get config_get = config.get
def mock_config_get(section: str, key: str) -> str: def mock_config_get(section: str, key: str) -> str: