MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_table_drop_before

Method test_table_drop_before

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

Source from the content-addressed store, hash-verified

103 )
104
105 def test_table_drop_before(self):
106 table, bind = self.table, self.bind
107 canary = mock.Mock()
108 event.listen(table, "before_drop", canary.before_drop)
109
110 table.create(bind)
111 table.drop(bind)
112 eq_(
113 canary.mock_calls,
114 [
115 mock.call.before_drop(
116 table,
117 self.bind,
118 checkfirst=CheckFirst.NONE,
119 _ddl_runner=mock.ANY,
120 _is_metadata_operation=mock.ANY,
121 )
122 ],
123 )
124
125 def test_table_drop_after(self):
126 table, bind = self.table, self.bind

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected