Vendored Docker SDK for Python code: remove unused constants (#1037)

* Remove constants that are never used.

* Adjust unit tests.
This commit is contained in:
Felix Fontein
2025-02-01 23:14:19 +01:00
committed by GitHub
parent 511cfe52ca
commit bcd6e57450
6 changed files with 20 additions and 9 deletions
@@ -34,7 +34,7 @@ if sys.version_info < (2, 7):
from ansible_collections.community.docker.plugins.module_utils._api import constants, errors
from ansible_collections.community.docker.plugins.module_utils._api.api.client import APIClient
from ansible_collections.community.docker.plugins.module_utils._api.constants import DEFAULT_DOCKER_API_VERSION
from ansible_collections.community.docker.tests.unit.plugins.module_utils._api.constants import DEFAULT_DOCKER_API_VERSION
from requests.packages import urllib3
from .. import fake_api
@@ -109,7 +109,7 @@ def fake_read_from_socket(self, response, stream, tty=False, demux=False):
url_base = '{prefix}/'.format(prefix=fake_api.prefix)
url_prefix = '{0}v{1}/'.format(
url_base,
constants.DEFAULT_DOCKER_API_VERSION)
DEFAULT_DOCKER_API_VERSION)
class BaseAPIClientTest(unittest.TestCase):