Skip to content

Commit

Permalink
add sample tests for business cards and model compose (#14515)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristapratico authored Oct 16, 2020
1 parent b6c571f commit 91244f5
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions sdk/formrecognizer/azure-ai-formrecognizer/tests/test_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,21 @@ def test_sample_differentiate_output_models_trained_with_and_without_labels(
form_recognizer_account,
form_recognizer_account_key
)

@pytest.mark.live_test_only
@GlobalFormRecognizerAccountPreparer()
def test_sample_recognize_business_cards(
self, resource_group, location, form_recognizer_account, form_recognizer_account_key
):
_test_file('sample_recognize_business_cards.py', form_recognizer_account, form_recognizer_account_key)

@pytest.mark.live_test_only
@GlobalFormRecognizerAccountPreparer()
def test_sample_create_composed_model(
self, resource_group, location, form_recognizer_account, form_recognizer_account_key
):
os.environ["PURCHASE_ORDER_OFFICE_SUPPLIES_SAS_URL"] = self.get_settings_value("FORM_RECOGNIZER_STORAGE_CONTAINER_SAS_URL")
os.environ["PURCHASE_ORDER_OFFICE_EQUIPMENT_SAS_URL"] = self.get_settings_value("FORM_RECOGNIZER_STORAGE_CONTAINER_SAS_URL")
os.environ["PURCHASE_ORDER_OFFICE_FURNITURE_SAS_URL"] = self.get_settings_value("FORM_RECOGNIZER_STORAGE_CONTAINER_SAS_URL")
os.environ["PURCHASE_ORDER_OFFICE_CLEANING_SUPPLIES_SAS_URL"] = self.get_settings_value("FORM_RECOGNIZER_STORAGE_CONTAINER_SAS_URL")
_test_file('sample_create_composed_model.py', form_recognizer_account, form_recognizer_account_key)
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,21 @@ async def test_sample_differentiate_output_models_trained_with_and_without_label
form_recognizer_account,
form_recognizer_account_key
)

@pytest.mark.live_test_only
@GlobalFormRecognizerAccountPreparer()
def test_sample_recognize_business_cards_async(
self, resource_group, location, form_recognizer_account, form_recognizer_account_key
):
_test_file('sample_recognize_business_cards_async.py', form_recognizer_account, form_recognizer_account_key)

@pytest.mark.live_test_only
@GlobalFormRecognizerAccountPreparer()
def test_sample_create_composed_model_async(
self, resource_group, location, form_recognizer_account, form_recognizer_account_key
):
os.environ["PURCHASE_ORDER_OFFICE_SUPPLIES_SAS_URL"] = self.get_settings_value("FORM_RECOGNIZER_STORAGE_CONTAINER_SAS_URL")
os.environ["PURCHASE_ORDER_OFFICE_EQUIPMENT_SAS_URL"] = self.get_settings_value("FORM_RECOGNIZER_STORAGE_CONTAINER_SAS_URL")
os.environ["PURCHASE_ORDER_OFFICE_FURNITURE_SAS_URL"] = self.get_settings_value("FORM_RECOGNIZER_STORAGE_CONTAINER_SAS_URL")
os.environ["PURCHASE_ORDER_OFFICE_CLEANING_SUPPLIES_SAS_URL"] = self.get_settings_value("FORM_RECOGNIZER_STORAGE_CONTAINER_SAS_URL")
_test_file('sample_create_composed_model_async.py', form_recognizer_account, form_recognizer_account_key)

0 comments on commit 91244f5

Please sign in to comment.