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

Method test_metadata_drop_before

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

Source from the content-addressed store, hash-verified

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