def test_constructor_sets_instrumentation_key(self): face = Client.face('key') vision = Client.vision('key') emotion = Client.emotion('key') self.assertIsNotNone(face) self.assertIsNotNone(vision) self.assertIsNotNone(emotion)
def test_constructor_sets_instrumentation_key(self): face = Client.face('key') vision = Client.vision('key') emotion = Client.emotion('key') self.assertIsNotNone(face) self.assertIsNotNone(vision) self.assertIsNotNone(emotion)
def setUpClass(cls): # set up self.client for tests cls.client = Client.vision(os.environ['OXFORD_VISION_API_KEY']) cls.localFilePrefix = os.path.join(rootDirectory, 'tests', 'images') cls.analyzeOptions = { 'ImageType': True, 'Color': True, 'Faces': True, 'Adult': True, 'Categories': True } cls.thumbnailOptions = { 'width': 100, 'height': 100, 'smartCropping': True } cls.ocrOptions = {'language': 'en', 'detectOrientation': True}
def setUpClass(cls): # set up self.client for tests cls.client = Client.vision(os.environ['OXFORD_VISION_API_KEY']) cls.localFilePrefix = os.path.join(rootDirectory, 'tests', 'images') cls.analyzeOptions = { 'ImageType': True, 'Color': True, 'Faces': True, 'Adult': True, 'Categories': True } cls.thumbnailOptions = { 'width': 100, 'height': 100, 'smartCropping': True } cls.ocrOptions = { 'language': 'en', 'detectOrientation': True }