mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-07-24 03:11:14 +00:00
refactor: implement generic optional import mechanisms
this project is actively using optional imports, which leads to duplicate handling here and there. This commit implements logic in special method to reduce complexity and simplify tests paths
This commit is contained in:
@@ -48,7 +48,8 @@ def test_setup_apispec(application: Application, mocker: MockerFixture) -> None:
|
||||
must set api specification
|
||||
"""
|
||||
apispec_mock = mocker.patch("aiohttp_apispec.setup_aiohttp_apispec")
|
||||
assert setup_apispec(application)
|
||||
|
||||
setup_apispec(application)
|
||||
apispec_mock.assert_called_once_with(
|
||||
application,
|
||||
url="/api-docs/swagger.json",
|
||||
|
||||
Reference in New Issue
Block a user