mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(test_aurblup): use correct type hint for tmpdir
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
fccd8b63d2
commit
043ac7fe92
1 changed files with 3 additions and 2 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Reference in a new issue