Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ff791ec

Browse files
author
Takashi Matsuo
authored
[healthcare] fix: use uuid for resource names (GoogleCloudPlatform#3267)
1 parent bead166 commit ff791ec

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

healthcare/api-client/fhir/fhir_resources_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
service_account_json = os.environ["GOOGLE_APPLICATION_CREDENTIALS"]
3030

3131
bundle = os.path.join(os.path.dirname(__file__), "resources/execute_bundle.json")
32-
dataset_id = "test_dataset_{}".format(str(uuid.uuid4()))
33-
fhir_store_id = "test_fhir_store-{}".format(str(uuid.uuid4()))
32+
dataset_id = "test_dataset_{}".format(uuid.uuid4())
33+
fhir_store_id = "test_fhir_store-{}".format(uuid.uuid4())
3434
resource_type = "Patient"
3535

3636

healthcare/api-client/fhir/fhir_stores_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import pytest
1717
import sys
1818
import time
19+
import uuid
1920

2021
from google.cloud import exceptions, storage
2122

@@ -28,8 +29,8 @@
2829
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]
2930
service_account_json = os.environ["GOOGLE_APPLICATION_CREDENTIALS"]
3031

31-
dataset_id = "test_dataset_{}".format(int(time.time()))
32-
fhir_store_id = "test_fhir_store-{}".format(int(time.time()))
32+
dataset_id = "test_dataset_{}".format(uuid.uuid4())
33+
fhir_store_id = "test_fhir_store-{}".format(uuid.uuid4())
3334

3435
gcs_uri = os.environ["CLOUD_STORAGE_BUCKET"]
3536
RESOURCES = os.path.join(os.path.dirname(__file__), "resources")

0 commit comments

Comments
 (0)