File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
healthcare/api-client/hl7v2 Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 14
14
15
15
import os
16
16
import pytest
17
+ import random
18
+ import string
17
19
import sys
18
20
import time
19
21
27
29
project_id = os .environ ['GOOGLE_CLOUD_PROJECT' ]
28
30
service_account_json = os .environ ['GOOGLE_APPLICATION_CREDENTIALS' ]
29
31
30
- dataset_id = 'test_dataset_{}' .format (int (time .time ()))
31
- hl7v2_store_id = 'test_hl7v2_store-{}' .format (int (time .time ()))
32
+ # assume we can access the OS provied raondom source.
33
+ random .seed ()
34
+ dataset_id = 'test_dataset_{}_{}' .format (
35
+ int (time .time ()),
36
+ '' .join ([random .choice (string .ascii_letters ) for n in range (5 )]))
37
+ hl7v2_store_id = 'test_hl7v2_store-{}-{}' .format (
38
+ int (time .time ()),
39
+ '' .join ([random .choice (string .ascii_letters ) for n in range (5 )]))
32
40
hl7v2_message_file = 'resources/hl7-sample-ingest.json'
33
41
label_key = 'PROCESSED'
34
42
label_value = 'TRUE'
Original file line number Diff line number Diff line change 14
14
15
15
import os
16
16
import pytest
17
+ import random
18
+ import string
17
19
import sys
18
20
import time
19
21
26
28
project_id = os .environ ['GOOGLE_CLOUD_PROJECT' ]
27
29
service_account_json = os .environ ['GOOGLE_APPLICATION_CREDENTIALS' ]
28
30
29
- dataset_id = 'test_dataset_{}' .format (int (time .time ()))
30
- hl7v2_store_id = 'test_hl7v2_store-{}' .format (int (time .time ()))
31
+ # assume we can access the OS provied raondom source.
32
+ random .seed ()
33
+ dataset_id = 'test_dataset_{}_{}' .format (
34
+ int (time .time ()),
35
+ '' .join ([random .choice (string .ascii_letters ) for n in range (5 )]))
36
+ hl7v2_store_id = 'test_hl7v2_store-{}-{}' .format (
37
+ int (time .time ()),
38
+ '' .join ([random .choice (string .ascii_letters ) for n in range (5 )]))
31
39
32
40
33
41
@pytest .fixture (scope = 'module' )
You can’t perform that action at this time.
0 commit comments