Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_collect_images_many(self):
test_dir = self.extract_test_tar('docker/v10_format/merge.tgz')
base = os.path.dirname(test_dir).strip('\\/')
result = collect_images(test_dir)
result = [f.replace(base, '').lstrip('\\/') for f in result]
expected = ['merge.tgz/merge/busybox', 'merge.tgz/merge/busybox2']
assert sorted(expected) == sorted(result)
def test_collect_images_single(self):
test_dir = self.extract_test_tar('docker/v10_format/busybox2.tgz')
result = collect_images(test_dir)
assert len(result) == 1
def test_collect_images(self):
test_dir = self.extract_test_tar('docker/v10_format/images.tgz')
result = collect_images(test_dir)
assert len(result) == 3