(self)
| 259 | ) |
| 260 | |
| 261 | def test_metadata_create_both(self): |
| 262 | metadata, bind = self.metadata, self.bind |
| 263 | canary = mock.Mock() |
| 264 | |
| 265 | event.listen(metadata, "before_create", canary.before_create) |
| 266 | event.listen(metadata, "after_create", canary.after_create) |
| 267 | |
| 268 | metadata.create_all(bind) |
| 269 | metadata.drop_all(bind) |
| 270 | eq_( |
| 271 | canary.mock_calls, |
| 272 | [ |
| 273 | mock.call.before_create( |
| 274 | metadata, |
| 275 | self.bind, |
| 276 | checkfirst=False, |
| 277 | tables=list(metadata.tables.values()), |
| 278 | _ddl_runner=mock.ANY, |
| 279 | ), |
| 280 | mock.call.after_create( |
| 281 | metadata, |
| 282 | self.bind, |
| 283 | checkfirst=False, |
| 284 | tables=list(metadata.tables.values()), |
| 285 | _ddl_runner=mock.ANY, |
| 286 | ), |
| 287 | ], |
| 288 | ) |
| 289 | |
| 290 | def test_metadata_drop_before(self): |
| 291 | metadata, bind = self.metadata, self.bind |
nothing calls this directly
no test coverage detected