Skip to content

Commit 8fa7ebf

Browse files
committed
Fixed incorrect logic to get call count for 'tag_image'
1 parent 05aff18 commit 8fa7ebf

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

tests/cli/test_build_images.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@
2525
# Images | Tags | Source | Destination | User ID | Group ID | Group Name | Dry Run
2626
# Default settings
2727
(images, [], "", "", "", "", "", False),
28+
# Populated flags
2829
(
2930
images,
30-
[
31-
"latest",
32-
"dev",
33-
],
31+
["latest", "dev", "1.1.1"],
3432
"",
3533
"docker.io",
3634
"12345",
@@ -40,10 +38,7 @@
4038
),
4139
(
4240
images,
43-
[
44-
"latest",
45-
"dev",
46-
],
41+
["latest", "dev", "1.1.1"],
4742
"",
4843
"docker.io",
4944
"12345",
@@ -157,11 +152,11 @@ def test_run(
157152

158153
# Check that 'tag_image' was called with the correct arguments
159154
if other_tags:
160-
assert mock_tag.call_count == len(images) * len(other_tags)
155+
assert mock_tag.call_count == len(other_tags)
161156
expected_tag_calls = (
162157
call(
163158
image_path=image,
164-
tags=other_tags,
159+
tags=tags[1:],
165160
dry_run=dry_run if dry_run else def_dry_run,
166161
)
167162
for image in built_images

0 commit comments

Comments
 (0)