Skip to content

Commit ca64271

Browse files
committed
fix to testcase
1 parent ff26bc6 commit ca64271

File tree

1 file changed

+8
-2
lines changed
  • sdk/formrecognizer/azure-ai-formrecognizer/tests

1 file changed

+8
-2
lines changed

sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
import os
1111
import pytest
1212
import re
13+
from collections import namedtuple
1314
from azure.core.credentials import AzureKeyCredential, AccessToken
1415
from devtools_testutils import (
1516
AzureTestCase,
1617
AzureMgmtPreparer,
17-
FakeResource,
1818
ResourceGroupPreparer,
1919
)
2020
from devtools_testutils.cognitiveservices_testcase import CognitiveServicesAccountPreparer
@@ -24,6 +24,11 @@
2424
)
2525
from azure_devtools.scenario_tests.utilities import is_text_payload
2626

27+
FakeResource = namedtuple(
28+
'FakeResource',
29+
['name', 'id', 'location']
30+
)
31+
2732

2833
class AccessTokenReplacer(RecordingProcessor):
2934
"""Replace the access token in a request/response body."""
@@ -377,7 +382,8 @@ def create_resource(self, name, **kwargs):
377382
else:
378383
rg = FakeResource(
379384
name="rgname",
380-
id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname"
385+
id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname",
386+
location="westus"
381387
)
382388

383389
return {

0 commit comments

Comments
 (0)