diff --git a/azure-cognitiveservices-vision-face/tests/test_face.py b/azure-cognitiveservices-vision-face/tests/test_face.py index 93fa6537c356..0821ec48e2cf 100644 --- a/azure-cognitiveservices-vision-face/tests/test_face.py +++ b/azure-cognitiveservices-vision-face/tests/test_face.py @@ -10,7 +10,7 @@ # -------------------------------------------------------------------------- from os.path import dirname, join, realpath -from azure.cognitiveservices.vision.face import FaceAPI +from azure.cognitiveservices.vision.face import FaceClient from azure.cognitiveservices.vision.face.models import Gender from msrest.authentication import CognitiveServicesCredentials @@ -48,9 +48,9 @@ def test_face_detect(self): credentials = CognitiveServicesCredentials( self.settings.CS_SUBSCRIPTION_KEY ) - face_api = FaceAPI("westus2", credentials=credentials) + face_client = FaceClient("https://westus2.api.cognitive.microsoft.com", credentials=credentials) with open(join(CWD, "facefindsimilar.queryface.jpg"), "rb") as face_fd: - result = face_api.face.detect_with_stream( + result = face_client.face.detect_with_stream( face_fd, return_face_attributes=['age','gender','headPose','smile','facialHair','glasses','emotion','hair','makeup','occlusion','accessories','blur','exposure','noise'] )