MCPcopy Index your code
hub / github.com/clips/pattern / test_google_translate

Method test_google_translate

test/test_web.py:571–580  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

569 self._test_results("Facebook", *self.api["Facebook"], **{"baseline": [0,1,0,0]})
570
571 def test_google_translate(self):
572 try:
573 # Assert Google Translate API.
574 # Requires license with billing enabled.
575 source, license, Engine = self.api["Google"]
576 v = Engine(license, throttle=0.25).translate(u"thé", input="fr", output="en", cached=False)
577 self.assertEqual(v, "tea")
578 print "pattern.web.Google.translate()"
579 except web.HTTP401Authentication:
580 pass
581
582 def test_google_identify(self):
583 try:

Callers

nothing calls this directly

Calls 1

translateMethod · 0.80

Tested by

no test coverage detected