MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_table_drop_after

Method test_table_drop_after

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

Source from the content-addressed store, hash-verified

123 )
124
125 def test_table_drop_after(self):
126 table, bind = self.table, self.bind
127 canary = mock.Mock()
128 event.listen(table, "after_drop", canary.after_drop)
129
130 table.create(bind)
131 canary.state = "skipped"
132 table.drop(bind)
133 eq_(
134 canary.mock_calls,
135 [
136 mock.call.after_drop(
137 table,
138 self.bind,
139 checkfirst=CheckFirst.NONE,
140 _ddl_runner=mock.ANY,
141 _is_metadata_operation=mock.ANY,
142 )
143 ],
144 )
145
146 def test_table_drop_both(self):
147 table, bind = self.table, self.bind

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected