示例#1
0
文件: tests.py 项目: alephmelo/woordy
 def test_translate_valid(self):
     self.maxDiff = None
     method_result = Woordy.translate("book", "en", "pt")
     result = '{"livro": "collection of sheets of paper bound together containing printed or written material"}'
     middle_val = json.loads(result)
     expected_result = json.dumps(middle_val)        
     self.assertCountEqual(expected_result, expected_result)
示例#2
0
文件: tests.py 项目: naerthon/woordy
 def test_translate_valid(self):
     self.maxDiff = None
     method_result = Woordy.translate("book", "en", "pt")
     result = '{"livro": "collection of sheets of paper bound together containing printed or written material"}'
     middle_val = json.loads(result)
     expected_result = json.dumps(middle_val)
     self.assertCountEqual(expected_result, expected_result)
示例#3
0
文件: tests.py 项目: alephmelo/woordy
 def test_translate_not_valid(self):
         method_result = Woordy.translate("auhfa", "en", "pt")
         expected_result = 'Word not found. Try checking for some typo issues.'
         self.assertEqual(method_result, expected_result)
示例#4
0
文件: tests.py 项目: naerthon/woordy
 def test_translate_not_valid(self):
     method_result = Woordy.translate("auhfa", "en", "pt")
     expected_result = 'Word not found. Try checking for some typo issues.'
     self.assertEqual(method_result, expected_result)