MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_schema_translation

Method test_schema_translation

test/engine/test_reflection.py:1853–1868  ·  view source on GitHub ↗
(self, connection, metadata)

Source from the content-addressed store, hash-verified

1851
1852 @testing.requires.schemas
1853 def test_schema_translation(self, connection, metadata):
1854 Table(
1855 "foob",
1856 metadata,
1857 Column("q", Integer),
1858 schema=config.test_schema,
1859 )
1860 metadata.create_all(connection)
1861
1862 m = MetaData()
1863 map_ = {"foob": config.test_schema}
1864
1865 c2 = connection.execution_options(schema_translate_map=map_)
1866 t = Table("foob", m, schema="foob", autoload_with=c2)
1867 eq_(t.schema, "foob")
1868 eq_(t.c.keys(), ["q"])
1869
1870 @testing.requires.schemas
1871 def test_explicit_default_schema_metadata(self, connection, metadata):

Callers

nothing calls this directly

Calls 7

TableClass · 0.90
ColumnClass · 0.90
MetaDataClass · 0.90
eq_Function · 0.90
create_allMethod · 0.80
execution_optionsMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected