MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_metadata_drop_after

Method test_metadata_drop_after

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

Source from the content-addressed store, hash-verified

309 )
310
311 def test_metadata_drop_after(self):
312 metadata, bind = self.metadata, self.bind
313 canary = mock.Mock()
314 event.listen(metadata, "after_drop", canary.after_drop)
315
316 metadata.create_all(bind)
317 metadata.drop_all(bind)
318 eq_(
319 canary.mock_calls,
320 [
321 mock.call.after_drop(
322 metadata,
323 self.bind,
324 checkfirst=CheckFirst.NONE,
325 tables=list(metadata.tables.values()),
326 _ddl_runner=mock.ANY,
327 )
328 ],
329 )
330
331 def test_metadata_drop_both(self):
332 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
after_dropMethod · 0.80
listenMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected