Skip to content

Commit

Permalink
MINOR: fix: use importer as module (open-metadata#18793)
Browse files Browse the repository at this point in the history
* fix: use importer as module

to allow monkeypatching in collate

* Update i_validator_builder.py
  • Loading branch information
sushi30 authored Nov 26, 2024
1 parent 3e7808b commit 2e9efe5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from metadata.generated.schema.tests.testCase import TestCase, TestCaseParameterValue
from metadata.generated.schema.type.basic import Timestamp
from metadata.profiler.processor.runner import QueryRunner
from metadata.utils.importer import import_test_case_class
from metadata.utils import importer

if TYPE_CHECKING:
from pandas import DataFrame
Expand Down Expand Up @@ -59,7 +59,8 @@ def __init__(
"""
self._test_case = test_case
self.runner = runner
self.validator_cls: Type[BaseTestValidator] = import_test_case_class(
# TODO this will be removed on https://github.com/open-metadata/OpenMetadata/pull/18716
self.validator_cls: Type[BaseTestValidator] = importer.import_test_case_class(
entity_type,
self._get_source_type(),
self.test_case.testDefinition.fullyQualifiedName, # type: ignore
Expand Down

0 comments on commit 2e9efe5

Please sign in to comment.