(self, item_exists)
| 22 | |
| 23 | class EmitDDLTest(fixtures.TestBase): |
| 24 | def _mock_connection(self, item_exists): |
| 25 | def has_item(connection, name, schema): |
| 26 | return item_exists(name) |
| 27 | |
| 28 | def has_index(connection, tablename, idxname, schema): |
| 29 | return item_exists(idxname) |
| 30 | |
| 31 | return Mock( |
| 32 | dialect=Mock( |
| 33 | supports_sequences=True, |
| 34 | has_table=Mock(side_effect=has_item), |
| 35 | has_sequence=Mock(side_effect=has_item), |
| 36 | has_index=Mock(side_effect=has_index), |
| 37 | supports_comments=True, |
| 38 | inline_comments=False, |
| 39 | ), |
| 40 | _schema_translate_map=None, |
| 41 | ) |
| 42 | |
| 43 | def _mock_create_fixture( |
| 44 | self, checkfirst, tables, item_exists=lambda item: False |
no outgoing calls
no test coverage detected