(self)
| 75 | ) |
| 76 | |
| 77 | def test_table_create_both(self): |
| 78 | table, bind = self.table, self.bind |
| 79 | canary = mock.Mock() |
| 80 | event.listen(table, "before_create", canary.before_create) |
| 81 | event.listen(table, "after_create", canary.after_create) |
| 82 | |
| 83 | table.create(bind) |
| 84 | table.drop(bind) |
| 85 | eq_( |
| 86 | canary.mock_calls, |
| 87 | [ |
| 88 | mock.call.before_create( |
| 89 | table, |
| 90 | self.bind, |
| 91 | checkfirst=CheckFirst.NONE, |
| 92 | _ddl_runner=mock.ANY, |
| 93 | _is_metadata_operation=mock.ANY, |
| 94 | ), |
| 95 | mock.call.after_create( |
| 96 | table, |
| 97 | self.bind, |
| 98 | checkfirst=CheckFirst.NONE, |
| 99 | _ddl_runner=mock.ANY, |
| 100 | _is_metadata_operation=mock.ANY, |
| 101 | ), |
| 102 | ], |
| 103 | ) |
| 104 | |
| 105 | def test_table_drop_before(self): |
| 106 | table, bind = self.table, self.bind |
nothing calls this directly
no test coverage detected