Skip to content

Commit

Permalink
hardcode region
Browse files Browse the repository at this point in the history
  • Loading branch information
kristapratico committed May 20, 2020
1 parent c100972 commit 688c3eb
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 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,11 +24,6 @@
)
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 @@ -382,12 +377,11 @@ def create_resource(self, name, **kwargs):
else:
rg = FakeResource(
name="rgname",
id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname",
location="westus"
id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname"
)

return {
'location': 'westus2',
'location': 'westus',
'resource_group': rg,
}

Expand Down Expand Up @@ -458,7 +452,7 @@ def create_resource(self, name, **kwargs):
form_recognizer_name = FormRecognizerTest._FORM_RECOGNIZER_NAME

resource_id = resource_group.id + "/providers/Microsoft.CognitiveServices/accounts/" + form_recognizer_name
resource_location = resource_group.location
resource_location = "westus"
self.test_class_instance.scrubber.register_name_pair(
resource_id,
"resource_id"
Expand Down Expand Up @@ -520,7 +514,7 @@ def create_form_client_and_container_sas_url(self, **kwargs):
@pytest.fixture(scope="session")
def form_recognizer_account():
test_case = AzureTestCase("__init__")
rg_preparer = ResourceGroupPreparer(random_name_enabled=True, name_prefix='pycog')
rg_preparer = ResourceGroupPreparer(random_name_enabled=True, name_prefix='pycog', location="westus")
form_recognizer_preparer = CognitiveServicesAccountPreparer(
random_name_enabled=True,
kind="formrecognizer",
Expand Down

0 comments on commit 688c3eb

Please sign in to comment.