Skip to content

Commit

Permalink
fix to testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
kristapratico committed May 20, 2020
1 parent ff26bc6 commit ca64271
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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."""
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit ca64271

Please sign in to comment.