(self, dttm_defaults)
| 80 | self._old_sqla_table_mutator = app.config["SQLA_TABLE_MUTATOR"] |
| 81 | |
| 82 | def createTable(self, dttm_defaults): |
| 83 | app.config["SQLA_TABLE_MUTATOR"] = lambda t: apply_dttm_defaults( |
| 84 | t, dttm_defaults |
| 85 | ) |
| 86 | resp = self.client.post( |
| 87 | "/tablemodelview/add", |
| 88 | data=dict(database=self._test_db_id, table_name="logs"), |
| 89 | follow_redirects=True, |
| 90 | ) |
| 91 | self.assertEqual(resp.status_code, 200) |
| 92 | self._logs_table = ( |
| 93 | db.session.query(SqlaTable).filter_by(table_name="logs").one() |
| 94 | ) |
| 95 | |
| 96 | def tearDown(self): |
| 97 | app.config["SQLA_TABLE_MUTATOR"] = self._old_sqla_table_mutator |
no test coverage detected