From 271c29cabb5f1b6f9149a0b5ff5cd9547181c191 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Wed, 15 May 2019 15:58:16 -0700 Subject: [PATCH] Change words used in system test. (#7987) --- packages/google-cloud-translate/tests/system.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-translate/tests/system.py b/packages/google-cloud-translate/tests/system.py index 3daebe005134..c586411b6111 100644 --- a/packages/google-cloud-translate/tests/system.py +++ b/packages/google-cloud-translate/tests/system.py @@ -54,19 +54,17 @@ def test_detect_language(self): self.assertEqual(detections[2]["language"], "fr") def test_translate(self): - values = ["hvala ti", "dankon", "Me llamo Jeff", "My name is Jeff"] + values = ["petnaest", "dek kvin", "Me llamo Jeff", "My name is Jeff"] translations = Config.CLIENT.translate( values, target_language="de", model="nmt" ) self.assertEqual(len(values), len(translations)) self.assertEqual(translations[0]["detectedSourceLanguage"].lower(), "hr") - self.assertEqual(translations[0]["translatedText"].lower(), "danke") + self.assertEqual(translations[0]["translatedText"].lower(), u"fünfzehn") self.assertEqual(translations[1]["detectedSourceLanguage"], "eo") - # For some reason this is translated as both "dank" and "danke" - # in a seemingly non-deterministic way. - self.assertIn(translations[1]["translatedText"].lower(), ("dank", "danke")) + self.assertEqual(translations[1]["translatedText"].lower(), u"fünfzehn") self.assertEqual(translations[2]["detectedSourceLanguage"], "es") self.assertEqual(translations[2]["translatedText"].lower(), u"ich heiße jeff")