Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
fix(translate): fix a broken test [(#4360)](GoogleCloudPlatform/pytho…
Browse files Browse the repository at this point in the history
…n-docs-samples#4360)

* fix(translate): fix a broken test

fixes #4353

* use uuid

* fix builds
  • Loading branch information
Takashi Matsuo authored and busunkim96 committed Sep 15, 2020
1 parent 6be3319 commit 5f7d141
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions samples/snippets/dataset_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import datetime
import os
import uuid

import pytest

Expand All @@ -28,7 +28,7 @@
@pytest.mark.slow
def test_dataset_create_import_delete(capsys):
# create dataset
dataset_name = "test_" + datetime.datetime.now().strftime("%Y%m%d%H%M%S")
dataset_name = f"test_{uuid.uuid4().hex[:27]}"
automl_translation_dataset.create_dataset(
project_id, compute_region, dataset_name, "en", "ja"
)
Expand Down
2 changes: 1 addition & 1 deletion samples/snippets/model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ def test_model_list_get_evaluate(capsys):
project_id, compute_region, model_id, model_evaluation_id
)
out, _ = capsys.readouterr()
assert "evaluation_metric" in out
assert model_evaluation_id in out

0 comments on commit 5f7d141

Please sign in to comment.