Skip to content

Commit 9f6ac97

Browse files
Aryamanz29claude
andcommitted
fix: Remove .attributes accessor from v9 integration tests
v9 msgspec structs have fields directly on the object — there is no .attributes inner class. Replace database.attributes.schemas with database.schemas, schema.attributes.tables with schema.tables, etc. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 60fdedf commit 9f6ac97

1 file changed

Lines changed: 19 additions & 20 deletions

File tree

tests_v9/integration/test_sql_assets.py

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ def test_create(
207207
database = client.asset.get_by_guid(
208208
databases[0].guid, Database, ignore_relationships=False
209209
)
210-
assert database.attributes.schemas
211-
schemas = database.attributes.schemas
210+
assert database.schemas
211+
schemas = database.schemas
212212
assert len(schemas) == 1
213213
assert schemas[0].guid == schema.guid
214214
TestSchema.schema = schema
@@ -242,10 +242,10 @@ def test_overload_creator(
242242
database = client.asset.get_by_guid(
243243
databases[0].guid, Database, ignore_relationships=False
244244
)
245-
assert database.attributes.schemas
246-
schemas = database.attributes.schemas
245+
assert database.schemas
246+
schemas = database.schemas
247247
assert len(schemas) == 2
248-
# `database.attributes.schemas` ordering can differ,
248+
# `database.schemas` ordering can differ,
249249
# so it's better to use "in" operator
250250
schema_guids = [schema.guid for schema in schemas]
251251
assert TestSchema.schema and TestSchema.schema.guid in schema_guids
@@ -317,8 +317,8 @@ def test_create(
317317
schema = client.asset.get_by_guid(
318318
guid=schemas[0].guid, asset_type=Schema, ignore_relationships=False
319319
)
320-
assert schema.attributes.tables
321-
tables = schema.attributes.tables
320+
assert schema.tables
321+
tables = schema.tables
322322
assert len(tables) == 1
323323
assert tables[0].guid == table.guid
324324
TestTable.table = table
@@ -357,10 +357,10 @@ def test_overload_creator(
357357
schema = client.asset.get_by_guid(
358358
guid=schemas[0].guid, asset_type=Schema, ignore_relationships=False
359359
)
360-
assert schema.attributes.tables
361-
tables = schema.attributes.tables
360+
assert schema.tables
361+
tables = schema.tables
362362
assert len(tables) == 2
363-
# `schema.attributes.tables` ordering can differ,
363+
# `schema.tables` ordering can differ,
364364
# so it's better to use "in" operator
365365
table_guids = [table.guid for table in tables]
366366
assert TestTable.table and TestTable.table.guid in table_guids
@@ -746,8 +746,8 @@ def test_create(
746746
table = client.asset.get_by_guid(
747747
asset_type=Table, guid=TestTable.table.guid, ignore_relationships=False
748748
)
749-
assert table.attributes.columns
750-
columns = table.attributes.columns
749+
assert table.columns
750+
columns = table.columns
751751
assert len(columns) == 1
752752
assert columns[0].guid == column.guid
753753
TestColumn.column = column
@@ -827,24 +827,23 @@ def test_overload_creator(
827827
table = client.asset.get_by_guid(
828828
asset_type=Table, guid=TestTable.table.guid, ignore_relationships=False
829829
)
830-
assert table.attributes.columns
831-
columns = table.attributes.columns
830+
assert table.columns
831+
columns = table.columns
832832

833833
assert len(columns) == 2
834-
# `table.attributes.columns` ordering can differ,
834+
# `table.columns` ordering can differ,
835835
# so it's better to use "in" operator
836836
column_guids = [column.guid for column in columns]
837837
assert TestColumn.column and TestColumn.column.guid in column_guids
838838
assert overload_column.guid and overload_column.guid in column_guids
839-
assert overload_column.attributes
840-
assert overload_column.attributes.schema_name == TestSchema.schema.name
839+
assert overload_column.schema_name == TestSchema.schema.name
841840
assert (
842-
overload_column.attributes.schema_qualified_name
841+
overload_column.schema_qualified_name
843842
== TestSchema.schema.qualified_name
844843
)
845-
assert overload_column.attributes.database_name == TestDatabase.database.name
844+
assert overload_column.database_name == TestDatabase.database.name
846845
assert (
847-
overload_column.attributes.database_qualified_name
846+
overload_column.database_qualified_name
848847
== TestDatabase.database.qualified_name
849848
)
850849

0 commit comments

Comments
 (0)