mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-01 21:23:10 +00:00

* tests: refactor refactor tests and consolidate common functionality in integrations.conftest this enables writing tests more concisely. demonstrated with postgres and mssql. will migrate more * format * removed helpers * changed scope of fictures * changed scope of fixtures * added profiler test for mssql * fixed import in data_quality test * json safe serialization * format * set MARS_Connection * use SerializableTableData instead of TableData * deleted file test_postgres.py * fixed tests * added more test cases * format * changed name test_models.py * removed the logic for serializing table data * wip * changed mapping in common type map * changed mapping in common type map * reverted TableData imports * reverted TableData imports * reverted TableData imports
20 lines
635 B
Python
20 lines
635 B
Python
from metadata.generated.schema.entity.data.table import Table
|
|
from metadata.ingestion.ometa.ometa_api import OpenMetadata
|
|
from metadata.workflow.metadata import MetadataWorkflow
|
|
|
|
|
|
def test_metadata(
|
|
db_service, metadata: OpenMetadata, run_workflow, ingestion_config, create_test_data
|
|
):
|
|
run_workflow(MetadataWorkflow, ingestion_config)
|
|
tables = metadata.list_entities(
|
|
Table,
|
|
params={
|
|
"databaseSchema": f"{db_service.fullyQualifiedName.root}.minio.my_schema"
|
|
},
|
|
)
|
|
assert (
|
|
next((t for t in tables.entities if t.name.root == "test_table"), None)
|
|
is not None
|
|
)
|