Skip to content

Commit

Permalink
[CodeBuild] changed function name
Browse files Browse the repository at this point in the history
  • Loading branch information
MarleneKress79789 committed Nov 2, 2023
1 parent ed5a081 commit bee294d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit_tests/udfs/test_base_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def udf_wrapper():
return meta


def test_setup(description, bucketfs_conn_name, bucketfs_conn, sub_dir, model_name):
def setup_tests_and_run(bucketfs_conn_name, bucketfs_conn, sub_dir, model_name):
mock_base_model_factory: Union[ModelFactoryProtocol, MagicMock] = create_autospec(ModelFactoryProtocol)
mock_tokenizer_factory: Union[ModelFactoryProtocol, MagicMock] = create_autospec(ModelFactoryProtocol)

Expand Down Expand Up @@ -94,7 +94,7 @@ def test_setup(description, bucketfs_conn_name, bucketfs_conn, sub_dir, model_na
])
def test_model_downloader_all_parameters(description, bucketfs_conn_name, bucketfs_conn, sub_dir, model_name):

res, mock_meta = test_setup(description, bucketfs_conn_name, bucketfs_conn, sub_dir, model_name)
res, mock_meta = setup_tests_and_run(bucketfs_conn_name, bucketfs_conn, sub_dir, model_name)
# check if no errors
assert res[0][-1] is None and len(res[0]) == len(mock_meta.output_columns)

Expand All @@ -112,7 +112,7 @@ def test_model_downloader_all_parameters(description, bucketfs_conn_name, bucket
"test_subdir", None)
])
def test_model_downloader_missing_parameters(description, bucketfs_conn_name, bucketfs_conn, sub_dir, model_name):
res, mock_meta = test_setup(description, bucketfs_conn_name, bucketfs_conn, sub_dir, model_name)
res, mock_meta = setup_tests_and_run(bucketfs_conn_name, bucketfs_conn, sub_dir, model_name)

error_field = res[0][-1]
expected_error = regex_matcher(f".*For each model model_name, bucketfs_conn and sub_dir need to be provided."
Expand Down

0 comments on commit bee294d

Please sign in to comment.