Skip to content

Commit c4b7743

Browse files
Merge branch 'feature/openapi-generator-sdk' into DX-2688
2 parents 7e1c593 + 2c6e376 commit c4b7743

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test/integration/test_media_api.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44

55
import os
6+
import uuid
67
import filecmp
78
import unittest
89

@@ -26,7 +27,7 @@ def setUp(self) -> None:
2627
self.account_id = os.environ['BW_ACCOUNT_ID']
2728
self.media_path = "./test/fixtures/"
2829
self.media_file = "python_cat.jpeg"
29-
self.media_id = os.environ['PYTHON_VERSION'] + "_" + os.environ['RUNNER_OS'] + "_" + os.environ['GITHUB_RUN_ID'] + "_" + self.media_file
30+
self.media_id = os.environ['PYTHON_VERSION'] + "_" + os.environ['RUNNER_OS'] + "_" + str(uuid.uuid4()) + "_" + self.media_file
3031
self.download_file_path = "cat_download.jpeg"
3132

3233
self.original_file = open(self.media_path + self.media_file, "rb")
@@ -77,7 +78,7 @@ def listMedia(self) -> None:
7778
pass
7879

7980
def getMedia(self) -> None:
80-
"""Test downloading the media we uploaded in step 1
81+
"""Test downloading the media we previously uploaded
8182
"""
8283
api_response_with_http_info = self.api_instance.get_media(
8384
self.account_id, self.media_id, _return_http_data_only=False)
@@ -95,7 +96,7 @@ def getMedia(self) -> None:
9596
download_file.close()
9697

9798
def deleteMedia(self) -> None:
98-
"""Test deleting the media that was uploaded in step 1
99+
"""Test deleting the media that we previously uploaded
99100
"""
100101
api_response_with_http_info = self.api_instance.delete_media(
101102
self.account_id, self.media_id, _return_http_data_only=False)
@@ -114,10 +115,7 @@ def test_steps(self) -> None:
114115
"""Test each function from _steps.call_order in specified order
115116
"""
116117
for name, step in self._steps():
117-
try:
118-
step()
119-
except ApiException as e:
120-
self.fail("{} failed ({}: {})".format(step, type(e), e))
118+
step()
121119

122120
@unittest.skip("API does not support url encoded characters in path")
123121
def testGetMediaWithBandwidthId(self) -> None:

0 commit comments

Comments
 (0)