MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / test_table_drop_both

Method test_table_drop_both

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

Source from the content-addressed store, hash-verified

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