diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt.py index 6eb9be39cc22..4efe9d52e4d5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt.py @@ -79,7 +79,7 @@ def test_mgmt_model_labeled(self, client, container_sas_url): models_list = client.list_custom_models() for model in models_list: self.assertIsNotNone(model.model_id) - self.assertEqual(model.status, "ready") + self.assertIsNotNone(model.status) self.assertIsNotNone(model.created_on) self.assertIsNotNone(model.last_modified) @@ -114,7 +114,7 @@ def test_mgmt_model_unlabeled(self, client, container_sas_url): models_list = client.list_custom_models() for model in models_list: self.assertIsNotNone(model.model_id) - self.assertEqual(model.status, "ready") + self.assertIsNotNone(model.status) self.assertIsNotNone(model.created_on) self.assertIsNotNone(model.last_modified) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt_async.py index 735875672cb5..2a51556f4a5a 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt_async.py @@ -79,7 +79,7 @@ async def test_mgmt_model_labeled(self, client, container_sas_url): models_list = client.list_custom_models() async for model in models_list: self.assertIsNotNone(model.model_id) - self.assertEqual(model.status, "ready") + self.assertIsNotNone(model.status) self.assertIsNotNone(model.created_on) self.assertIsNotNone(model.last_modified) @@ -112,7 +112,7 @@ async def test_mgmt_model_unlabeled(self, client, container_sas_url): models_list = client.list_custom_models() async for model in models_list: self.assertIsNotNone(model.model_id) - self.assertEqual(model.status, "ready") + self.assertIsNotNone(model.status) self.assertIsNotNone(model.created_on) self.assertIsNotNone(model.last_modified) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py index 090232ce8b57..e92978c22f45 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py @@ -449,9 +449,11 @@ def create_resource(self, name, **kwargs): if self.copy: if self.is_live: resource_group = kwargs.get("resource_group") + subscription_id = self.get_settings_value("SUBSCRIPTION_ID") form_recognizer_name = FormRecognizerTest._FORM_RECOGNIZER_NAME - resource_id = resource_group.id + "/providers/Microsoft.CognitiveServices/accounts/" + form_recognizer_name + resource_id = "/subscriptions/" + subscription_id + "/resourceGroups/" + resource_group.name + \ + "/providers/Microsoft.CognitiveServices/accounts/" + form_recognizer_name resource_location = "westus" self.test_class_instance.scrubber.register_name_pair( resource_id,