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

Method test_list_services

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

Source from the content-addressed store, hash-verified

65
66 @requires_api_version('1.24')
67 def test_list_services(self):
68 services = self.client.services()
69 assert isinstance(services, list)
70
71 test_services = self.client.services(filters={'name': 'dockerpytest_'})
72 assert len(test_services) == 0
73 self.create_simple_service()
74 test_services = self.client.services(filters={'name': 'dockerpytest_'})
75 assert len(test_services) == 1
76 assert 'dockerpytest_' in test_services[0]['Spec']['Name']
77
78 @requires_api_version('1.24')
79 def test_list_services_filter_by_label(self):

Callers

nothing calls this directly

Calls 2

create_simple_serviceMethod · 0.95
servicesMethod · 0.45

Tested by

no test coverage detected