Coverage for serverctl_deployd/dependencies.py : 100%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""
2Miscellaneous dependencies for the API.
3"""
6from functools import lru_cache
8import docker
9from docker.client import DockerClient
11from serverctl_deployd.config import Settings
14async def check_authentication() -> None:
15 """
16 TODO: To be implemented
17 """
18 pass # pylint: disable=unnecessary-pass
21async def get_docker_client() -> DockerClient:
22 """
23 Get the Docker client.
24 """
25 return docker.from_env() # pragma: no cover
28@lru_cache()
29def get_settings() -> Settings:
30 """
31 Return settings to be used as a dependency.
32 This is only there so that it can be overridden for tests.
33 """
34 return Settings()