Skip to content

Commit

Permalink
Update face test aligning with latest changes. (#3103)
Browse files Browse the repository at this point in the history
  • Loading branch information
lebronJ authored and lmazuel committed Aug 8, 2018
1 parent 5e6ab4f commit 68f1cd9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions azure-cognitiveservices-vision-face/tests/test_face.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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']
)
Expand Down

0 comments on commit 68f1cd9

Please sign in to comment.