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

Method test_table_drop_before

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

Source from the content-addressed store, hash-verified

102 )
103
104 def test_table_drop_before(self):
105 table, bind = self.table, self.bind
106 canary = mock.Mock()
107 event.listen(table, "before_drop", canary.before_drop)
108
109 table.create(bind)
110 table.drop(bind)
111 eq_(
112 canary.mock_calls,
113 [
114 mock.call.before_drop(
115 table,
116 self.bind,
117 checkfirst=False,
118 _ddl_runner=mock.ANY,
119 _is_metadata_operation=mock.ANY,
120 )
121 ],
122 )
123
124 def test_table_drop_after(self):
125 table, bind = self.table, self.bind

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected