diff --git a/packages/google-cloud-translate/samples/snippets/beta_snippets_test.py b/packages/google-cloud-translate/samples/snippets/beta_snippets_test.py index 4852168567ac..453fcb7ec4a1 100644 --- a/packages/google-cloud-translate/samples/snippets/beta_snippets_test.py +++ b/packages/google-cloud-translate/samples/snippets/beta_snippets_test.py @@ -28,7 +28,7 @@ @pytest.fixture(scope='function') def bucket(): """Create a temporary bucket to store annotation output.""" - bucket_name = str(uuid.uuid1()) + bucket_name = f'tmp-{uuid.uuid4().hex}' storage_client = storage.Client() bucket = storage_client.create_bucket(bucket_name) diff --git a/packages/google-cloud-translate/samples/snippets/translate_v3_batch_translate_text_with_glossary_test.py b/packages/google-cloud-translate/samples/snippets/translate_v3_batch_translate_text_with_glossary_test.py index dd2e688786ac..c2033ad3630c 100644 --- a/packages/google-cloud-translate/samples/snippets/translate_v3_batch_translate_text_with_glossary_test.py +++ b/packages/google-cloud-translate/samples/snippets/translate_v3_batch_translate_text_with_glossary_test.py @@ -57,7 +57,7 @@ def delete_glossary(): @pytest.fixture(scope="function") def bucket(): """Create a temporary bucket to store annotation output.""" - bucket_name = str(uuid.uuid1()) + bucket_name = f'tmp-{uuid.uuid4().hex}' storage_client = storage.Client() bucket = storage_client.create_bucket(bucket_name)