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

Method test_table_drop_both

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

Source from the content-addressed store, hash-verified

143 )
144
145 def test_table_drop_both(self):
146 table, bind = self.table, self.bind
147 canary = mock.Mock()
148
149 event.listen(table, "before_drop", canary.before_drop)
150 event.listen(table, "after_drop", canary.after_drop)
151
152 table.create(bind)
153 table.drop(bind)
154 eq_(
155 canary.mock_calls,
156 [
157 mock.call.before_drop(
158 table,
159 self.bind,
160 checkfirst=False,
161 _ddl_runner=mock.ANY,
162 _is_metadata_operation=mock.ANY,
163 ),
164 mock.call.after_drop(
165 table,
166 self.bind,
167 checkfirst=False,
168 _ddl_runner=mock.ANY,
169 _is_metadata_operation=mock.ANY,
170 ),
171 ],
172 )
173
174 def test_table_all(self):
175 table, bind = self.table, self.bind

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected