We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f510ea6 commit a4a3269Copy full SHA for a4a3269
1 file changed
tests/test_exact.py
@@ -63,7 +63,21 @@ def test_images():
63
client = ApiClient(configuration)
64
apis = ExactAPIs(client)
65
66
- imageset = apis.image_sets_api.list_image_sets().results[0].id
+ image_sets = apis.image_sets_api.list_image_sets().results
67
+ if not image_sets:
68
+ # Create a team if needed
69
+ teams = apis.team_api.list_teams().results
70
+ if not teams:
71
+ team = apis.team_api.create_team(body=Team(name='TestTeam'))
72
+ team_id = team.id
73
+ else:
74
+ team_id = teams[0].id
75
+ # Create image set
76
+ body = ImageSet(team=team_id, name='Test-ImageSet')
77
+ apis.image_sets_api.create_image_set(body=body)
78
79
+
80
+ imageset = image_sets[0].id
81
82
# Delete all images
83
product_id=1
0 commit comments