MCPcopy Index your code
hub / github.com/docker/docker-py / test_url_valid_resource

Method test_url_valid_resource

tests/unit/api_test.py:129–142  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

127 ) == 'Version parameter must be a string or None. Found float'
128
129 def test_url_valid_resource(self):
130 url = self.client._url('/hello/{0}/world', 'somename')
131 assert url == f"{url_prefix}hello/somename/world"
132
133 url = self.client._url(
134 '/hello/{0}/world/{1}', 'somename', 'someothername'
135 )
136 assert url == f"{url_prefix}hello/somename/world/someothername"
137
138 url = self.client._url('/hello/{0}/world', 'some?name')
139 assert url == f"{url_prefix}hello/some%3Fname/world"
140
141 url = self.client._url("/images/{0}/push", "localhost:5000/image")
142 assert url == f"{url_prefix}images/localhost:5000/image/push"
143
144 def test_url_invalid_resource(self):
145 with pytest.raises(ValueError):

Callers

nothing calls this directly

Calls 1

_urlMethod · 0.80

Tested by

no test coverage detected