MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / mock_engine

Method mock_engine

test/engine/test_ddlevents.py:960–971  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

958
959class DDLTest(fixtures.TestBase, AssertsCompiledSQL):
960 def mock_engine(self):
961 def executor(*a, **kw):
962 return None
963
964 engine = create_mock_engine(testing.db.name + "://", executor)
965 # fmt: off
966 engine.dialect.identifier_preparer = \
967 tsa.sql.compiler.IdentifierPreparer(
968 engine.dialect
969 )
970 # fmt: on
971 return engine
972
973 def test_tokens(self):
974 m = MetaData()

Callers 8

test_tokensMethod · 0.95
test_filterMethod · 0.95
test_use_alterMethod · 0.80
setup_testMethod · 0.80
setup_testMethod · 0.80

Calls 1

create_mock_engineFunction · 0.90

Tested by

no test coverage detected