helper function for Bitten coverage doctest
17 March 2008
17:25
as Python
| 1 | |
|---|---|
| 2 | def env_stub_with_tables(): |
| 3 | env = EnvironmentStub() |
| 4 | db = env.get_db_cnx() |
| 5 | cursor = db.cursor() |
| 6 | connector, _ = DatabaseManager(env)._get_connector() |
| 7 | for table in schema: |
| 8 | for stmt in connector.to_sql(table): |
| 9 | cursor.execute(stmt) |
| 10 | return env |
Comments
No comments so far.
