Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nnegrey authored and danoscarmike committed Jul 31, 2020
1 parent 62c4af2 commit 617876b
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 8 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def batch_translate_text(
output_config=output_config)

print(u"Waiting for operation to complete...")
response = operation.result(90)
response = operation.result(180)

print(u"Total Characters: {}".format(response.total_characters))
print(u"Translated Characters: {}".format(response.translated_characters))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@pytest.fixture(scope="function")
def bucket():
"""Create a temporary bucket to store annotation output."""
bucket_name = str(uuid.uuid1())
bucket_name = "test-{}".format(uuid.uuid4())
storage_client = storage.Client()
bucket = storage_client.create_bucket(bucket_name)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def batch_translate_text_with_glossary(
)

print(u"Waiting for operation to complete...")
response = operation.result(120)
response = operation.result(180)

print(u"Total Characters: {}".format(response.total_characters))
print(u"Translated Characters: {}".format(response.translated_characters))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@pytest.fixture(scope="session")
def glossary():
"""Get the ID of a glossary available to session (do not mutate/delete)."""
glossary_id = "must-start-with-letters-" + str(uuid.uuid1())
glossary_id = "test-{}".format(uuid.uuid4())
translate_v3_create_glossary.create_glossary(
PROJECT_ID, GLOSSARY_INPUT_URI, glossary_id
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def create_glossary(
# to translate the domain-specific terminology.
operation = client.create_glossary(parent=parent, glossary=glossary)

result = operation.result(timeout=90)
result = operation.result(timeout=180)
print("Created: {}".format(result.name))
print("Input Uri: {}".format(result.input_config.gcs_source.input_uri))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


def test_create_glossary(capsys):
glossary_id = "must-start-with-letters-" + str(uuid.uuid1())
glossary_id = "test-{}".format(uuid.uuid4())
translate_v3_create_glossary.create_glossary(
PROJECT_ID, GLOSSARY_INPUT_URI, glossary_id
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def delete_glossary(
parent = client.glossary_path(project_id, "us-central1", glossary_id)

operation = client.delete_glossary(parent)
result = operation.result(timeout=90)
result = operation.result(timeout=180)
print("Deleted: {}".format(result.name))


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

def test_delete_glossary(capsys):
# setup
glossary_id = "must-start-with-letters-" + str(uuid.uuid1())
glossary_id = "test-{}".format(uuid.uuid4())
translate_v3_create_glossary.create_glossary(
PROJECT_ID, GLOSSARY_INPUT_URI, glossary_id
)
Expand Down

0 comments on commit 617876b

Please sign in to comment.