mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-19 15:31:59 +00:00
25 lines
721 B
Python
25 lines
721 B
Python
import sys
|
|
|
|
import pytest
|
|
|
|
from metadata.generated.schema.entity.data.table import Constraint, Table
|
|
|
|
if not sys.version_info >= (3, 9):
|
|
pytest.skip("requires python 3.9+", allow_module_level=True)
|
|
|
|
|
|
def test_pass(
|
|
ingest_metadata,
|
|
metadata,
|
|
):
|
|
table: Table = metadata.get_by_name(
|
|
Table,
|
|
f"{ingest_metadata.fullyQualifiedName.root}.AdventureWorks.HumanResources.Department",
|
|
)
|
|
assert table is not None
|
|
assert table.columns[0].name.root == "DepartmentID"
|
|
assert table.columns[0].constraint == Constraint.PRIMARY_KEY
|
|
assert table.columns[1].name.root == "Name"
|
|
assert table.columns[2].name.root == "GroupName"
|
|
assert table.columns[3].name.root == "ModifiedDate"
|