Returns a function that can be used in place of docker_api
(data: dict[str, Any])
| 40 | |
| 41 | |
| 42 | def _testing_docker_api(data: dict[str, Any]) -> Callable[[str], dict[str, Any]]: |
| 43 | """Returns a function that can be used in place of docker_api""" |
| 44 | |
| 45 | def mock(url: str) -> dict[str, Any]: |
| 46 | if url in data: |
| 47 | return data[url] |
| 48 | else: |
| 49 | raise error.HTTPError(url, 404, f"Not found: {url}", {}, None) |
| 50 | |
| 51 | return mock |
| 52 | |
| 53 | |
| 54 | def parse_docker_date(d: str) -> datetime.datetime: |
no outgoing calls
no test coverage detected
searching dependent graphs…