MCPcopy Create free account
hub / github.com/docker/docker-py / tearDown

Method tearDown

tests/integration/api_service_test.py:24–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

22 force_leave_swarm(client)
23
24 def tearDown(self):
25 for service in self.client.services(filters={'name': 'dockerpytest_'}):
26 try:
27 self.client.remove_service(service['ID'])
28 except docker.errors.APIError:
29 pass
30 super().tearDown()
31
32 def get_service_name(self):
33 return f'dockerpytest_{random.getrandbits(64):x}'

Callers

nothing calls this directly

Calls 2

remove_serviceMethod · 0.80
servicesMethod · 0.45

Tested by

no test coverage detected