Skip to content

Commit 3133f4e

Browse files
author
Takashi Matsuo
authored
[codelabs] fix: use unique filename for photo upload (#3489)
fixes #2925
1 parent 517f099 commit 3133f4e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

codelabs/flex_and_vision/main_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import uuid
16+
1517
import pytest
1618
import requests
1719
import six
@@ -37,11 +39,12 @@ def test_index(app):
3739

3840
def test_upload_photo(app):
3941
test_photo_data = requests.get(TEST_PHOTO_URL).content
42+
test_photo_filename = 'flex_and_vision_{}.jpg'.format(uuid.uuid4().hex)
4043

4144
r = app.post(
4245
'/upload_photo',
4346
data={
44-
'file': (six.BytesIO(test_photo_data), 'flex_and_vision.jpg')
47+
'file': (six.BytesIO(test_photo_data), test_photo_filename)
4548
}
4649
)
4750

0 commit comments

Comments
 (0)