MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _mock_connection

Method _mock_connection

test/sql/test_ddlemit.py:24–41  ·  view source on GitHub ↗
(self, item_exists)

Source from the content-addressed store, hash-verified

22
23class EmitDDLTest(fixtures.TestBase):
24 def _mock_connection(self, item_exists):
25 def has_item(connection, name, schema):
26 return item_exists(name)
27
28 def has_index(connection, tablename, idxname, schema):
29 return item_exists(idxname)
30
31 return Mock(
32 dialect=Mock(
33 supports_sequences=True,
34 has_table=Mock(side_effect=has_item),
35 has_sequence=Mock(side_effect=has_item),
36 has_index=Mock(side_effect=has_index),
37 supports_comments=True,
38 inline_comments=False,
39 ),
40 _schema_translate_map=None,
41 )
42
43 def _mock_create_fixture(
44 self, checkfirst, tables, item_exists=lambda item: False

Callers 2

_mock_create_fixtureMethod · 0.95
_mock_drop_fixtureMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected