mirror of
https://github.com/wassname/IndicoIo-python.git
synced 2026-07-05 17:30:05 +08:00
ADD: default apis for text/image with tests
This commit is contained in:
@@ -136,6 +136,13 @@ class BatchAPIRun(unittest.TestCase):
|
||||
self.assertTrue(isinstance(response, list))
|
||||
self.assertTrue(set(response[0].keys()) == set(config.TEXT_APIS))
|
||||
|
||||
def test_default_multi_api_text(self):
|
||||
test_data = ['clearly an english sentence']
|
||||
response = batch_predict_text(test_data, api_key=self.api_key)
|
||||
|
||||
self.assertTrue(isinstance(response, list))
|
||||
self.assertTrue(set(response[0].keys()) == set(config.TEXT_APIS))
|
||||
|
||||
def test_multi_api_bad_api(self):
|
||||
self.assertRaises(ValueError,
|
||||
batch_predict_text,
|
||||
|
||||
Reference in New Issue
Block a user