Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cogs Face] Update Face SDK test aligning with latest Swagger changes. #3103

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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