FIX: FER No resize for detect

This commit is contained in:
Chris Lee
2015-07-30 09:56:35 -04:00
parent 4d652d3fbd
commit 43a541ca05
3 changed files with 15 additions and 4 deletions
+7
View File
@@ -87,6 +87,13 @@ class BatchAPIRun(unittest.TestCase):
self.assertTrue(isinstance(response, list))
self.assertTrue(isinstance(response[0], dict))
def test_fer_detect(self):
test_data = os.path.normpath(os.path.join(DIR, "data/fear.png"))
response = fer(test_data, api_key=self.api_key, detect=True)
self.assertIsInstance(response, list)
self.assertEqual(len(response), 1)
self.assertIn("location", response[0])
def test_batch_fer_pil_image(self):
test_data = [Image.open(os.path.normpath(os.path.join(DIR, "data/fear.png")))]
response = fer(test_data, api_key=self.api_key)