From ca642710e74babd6c64b4df3a94718eb2a6af93c Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Wed, 20 May 2020 12:47:23 -0700 Subject: [PATCH] fix to testcase --- .../azure-ai-formrecognizer/tests/testcase.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py index 15edfd6088d1..e6227d00fc72 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py @@ -10,11 +10,11 @@ import os import pytest import re +from collections import namedtuple from azure.core.credentials import AzureKeyCredential, AccessToken from devtools_testutils import ( AzureTestCase, AzureMgmtPreparer, - FakeResource, ResourceGroupPreparer, ) from devtools_testutils.cognitiveservices_testcase import CognitiveServicesAccountPreparer @@ -24,6 +24,11 @@ ) from azure_devtools.scenario_tests.utilities import is_text_payload +FakeResource = namedtuple( + 'FakeResource', + ['name', 'id', 'location'] +) + class AccessTokenReplacer(RecordingProcessor): """Replace the access token in a request/response body.""" @@ -377,7 +382,8 @@ def create_resource(self, name, **kwargs): else: rg = FakeResource( name="rgname", - id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname" + id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname", + location="westus" ) return {