mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-06-28 06:41:43 +00:00
optimize imports
This commit is contained in:
@ -2,7 +2,7 @@ import pytest
|
||||
|
||||
from pathlib import Path
|
||||
from pytest_mock import MockerFixture
|
||||
from unittest.mock import MagicMock, call as MockCall
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from ahriman.application.application.application_packages import ApplicationPackages
|
||||
from ahriman.models.package import Package
|
||||
|
@ -140,8 +140,7 @@ def test_configuration_create_devtools_mirror(args: argparse.Namespace, reposito
|
||||
"""
|
||||
must create configuration for the devtools with mirror set explicitly
|
||||
"""
|
||||
def get(section: str, key: str, *args: Any, **kwargs: Any) -> Any:
|
||||
del args
|
||||
def get(section: str, key: str, **kwargs: Any) -> Any:
|
||||
if section == "core" and key == "Include":
|
||||
return str(Setup.MIRRORLIST_PATH)
|
||||
return kwargs["fallback"]
|
||||
|
@ -18,7 +18,7 @@ def test_force_no_report(configuration: Configuration, database: SQLite, mocker:
|
||||
configuration.set_option("web", "port", "8080")
|
||||
load_mock = mocker.patch("ahriman.core.repository.Repository.load")
|
||||
|
||||
watcher = Watcher("x86_64", configuration, database)
|
||||
Watcher("x86_64", configuration, database)
|
||||
load_mock.assert_called_once_with("x86_64", configuration, database, report=False, unsafe=False)
|
||||
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
import datetime
|
||||
import pytest
|
||||
import time
|
||||
|
||||
from unittest.mock import MagicMock, PropertyMock
|
||||
|
||||
|
Reference in New Issue
Block a user