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

Method test_diff

tests/integration/api_container_test.py:966–977  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

964
965class DiffTest(BaseAPIIntegrationTest):
966 def test_diff(self):
967 container = self.client.create_container(TEST_IMG, ['touch', '/test'])
968 id = container['Id']
969 self.client.start(id)
970 self.tmp_containers.append(id)
971 exitcode = self.client.wait(id)['StatusCode']
972 assert exitcode == 0
973 diff = self.client.diff(id)
974 test_diff = [x for x in diff if x.get('Path', None) == '/test']
975 assert len(test_diff) == 1
976 assert 'Kind' in test_diff[0]
977 assert test_diff[0]['Kind'] == 1
978
979 def test_diff_with_dict_instead_of_id(self):
980 container = self.client.create_container(TEST_IMG, ['touch', '/test'])

Callers

nothing calls this directly

Calls 5

create_containerMethod · 0.80
startMethod · 0.45
waitMethod · 0.45
diffMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected