MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_metadata_drop_before

Method test_metadata_drop_before

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

Source from the content-addressed store, hash-verified

289 )
290
291 def test_metadata_drop_before(self):
292 metadata, bind = self.metadata, self.bind
293 canary = mock.Mock()
294 event.listen(metadata, "before_drop", canary.before_drop)
295
296 metadata.create_all(bind)
297 metadata.drop_all(bind)
298 eq_(
299 canary.mock_calls,
300 [
301 mock.call.before_drop(
302 metadata,
303 self.bind,
304 checkfirst=CheckFirst.NONE,
305 tables=list(metadata.tables.values()),
306 _ddl_runner=mock.ANY,
307 )
308 ],
309 )
310
311 def test_metadata_drop_after(self):
312 metadata, bind = self.metadata, self.bind

Callers

nothing calls this directly

Calls 6

eq_Function · 0.90
create_allMethod · 0.80
drop_allMethod · 0.80
before_dropMethod · 0.80
listenMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected