Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit fa19ffc

Browse files
authored
Switch translation tests to 'it' as 'es' shows strange results. (#119)
Switch the translation tests to 'it' as the up to now used 'es' now shows the English translation 'Hello' instead of the expected 'Hola'. No idea, why the result now is different than before. This may get fixed in the future, then we can switch back again. For the time being, the translation to 'it' shows the expected translation 'Ciao' and we use that for the tests.
1 parent 2e49c9b commit fa19ffc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/dat/watson/testWatsonService.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def main(args):
1111
username="APIKey",
1212
password=args.get("apikey"))
1313

14-
translation = language_translator.translate(text='Hello', model_id='en-es')
14+
translation = language_translator.translate(text='Hello', model_id='en-it')
1515
if LooseVersion(sdk_version) < LooseVersion('2.0.0'):
1616
return translation
1717
else:

tests/src/test/scala/integration/CredentialsIBMPythonWatsonTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class CredentialsIBMPythonWatsonTests extends TestHelpers with WskTestHelpers wi
4444
val apikey = creds.fields("apikey").asInstanceOf[JsString]
4545

4646
/*
47-
Uses Watson Translation Service to translate the word "Hello" in English, to "Hola" in Spanish.
47+
Uses Watson Translation Service to translate the word "Hello" in English, to "Ciao" in Italian.
4848
*/
4949
it should "Test whether watson translate service is reachable" in withAssetCleaner(wskprops) { (wp, assetHelper) =>
5050
val file = Some(new File(datdir, actionFileName).toString())
@@ -61,7 +61,7 @@ class CredentialsIBMPythonWatsonTests extends TestHelpers with WskTestHelpers wi
6161
val response = activation.response
6262
response.result.get.fields.get("error") shouldBe empty
6363
response.result.get.fields.get("translations") should be(
64-
Some(JsArray(JsObject("translation" -> JsString("Hola")))))
64+
Some(JsArray(JsObject("translation" -> JsString("Ciao")))))
6565
}
6666

6767
}

0 commit comments

Comments
 (0)