Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
test: flaky test, NMT model has changed (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
munkhuushmgl committed Jun 1, 2020
1 parent 0eb9ad1 commit 7a68632
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion noxfile.py
Expand Up @@ -138,7 +138,7 @@ def docs(session):
"""Build the docs for this library."""

session.install("-e", ".")
session.install("sphinx", "alabaster", "recommonmark")
session.install("sphinx<3.0.0", "alabaster", "recommonmark")

shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
Expand Down
6 changes: 5 additions & 1 deletion tests/system.py
Expand Up @@ -67,7 +67,11 @@ def test_translate(self):
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")
es_translation = translations[2]["translatedText"].lower()
self.assertTrue(
es_translation == u"ich heiße jeff"
or es_translation == u"mein name ist jeff"
)

self.assertEqual(translations[3]["detectedSourceLanguage"], "en")
self.assertEqual(
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/v2/test__http.py
Expand Up @@ -80,15 +80,15 @@ def test_extra_headers(self):
self.assertEqual(result, data)

expected_headers = {
"Accept-Encoding": "gzip",
base_http.CLIENT_INFO_HEADER: conn.user_agent,
"User-Agent": conn.user_agent,
"Accept-Encoding": "gzip",
}
expected_uri = conn.build_api_url("/rainbow")
http.request.assert_called_once_with(
data=req_data,
headers=expected_headers,
method="GET",
url=expected_uri,
timeout=None,
timeout=60,
)

0 comments on commit 7a68632

Please sign in to comment.