Commit e3bbffac authored by Michal Čihař's avatar Michal Čihař

Test error handling in reponses

parent 3a8adc06
......@@ -188,6 +188,21 @@ class MachineTranslationTest(TestCase):
machine = OpenTranTranslation()
self.assertTranslate(machine)
@httpretty.activate
def test_opentran_wrong(self):
httpretty.register_uri(
httpretty.GET,
'http://open-tran.eu/json/supported',
body='["en","cs"'
)
httpretty.register_uri(
httpretty.GET,
'http://en.cs.open-tran.eu/json/suggest/world',
body='['
)
machine = OpenTranTranslation()
self.assertTranslate(machine)
@httpretty.activate
def test_apertium(self):
httpretty.register_uri(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment