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

Method test_build_labels

tests/integration/api_build_test.py:205–220  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

203
204 @requires_api_version('1.23')
205 def test_build_labels(self):
206 script = io.BytesIO('\n'.join([
207 'FROM scratch',
208 ]).encode('ascii'))
209
210 labels = {'test': 'OK'}
211
212 stream = self.client.build(
213 fileobj=script, tag='labels', labels=labels
214 )
215 self.tmp_imgs.append('labels')
216 for _chunk in stream:
217 pass
218
219 info = self.client.inspect_image('labels')
220 assert info['Config']['Labels'] == labels
221
222 @requires_api_version('1.25')
223 def test_build_with_cache_from(self):

Callers

nothing calls this directly

Calls 3

joinMethod · 0.80
inspect_imageMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected