Skip to content

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 1, 2020
1 parent df15a38 commit 655bc03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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
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 655bc03

Please sign in to comment.