MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_table_create_before

Method test_table_create_before

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

Source from the content-addressed store, hash-verified

34 self.table = Table("t", self.metadata, Column("id", Integer))
35
36 def test_table_create_before(self):
37 table, bind = self.table, self.bind
38 canary = mock.Mock()
39 event.listen(table, "before_create", canary.before_create)
40
41 table.create(bind)
42 table.drop(bind)
43 eq_(
44 canary.mock_calls,
45 [
46 mock.call.before_create(
47 table,
48 self.bind,
49 checkfirst=False,
50 _ddl_runner=mock.ANY,
51 _is_metadata_operation=mock.ANY,
52 )
53 ],
54 )
55
56 def test_table_create_after(self):
57 table, bind = self.table, self.bind

Callers

nothing calls this directly

Calls 5

eq_Function · 0.90
before_createMethod · 0.80
listenMethod · 0.45
createMethod · 0.45
dropMethod · 0.45

Tested by

no test coverage detected