Creates the database and indexes (optional).
(ensure_indexes=True)
| 49 | |
| 50 | |
| 51 | def db_setup(ensure_indexes=True): |
| 52 | """ |
| 53 | Creates the database and indexes (optional). |
| 54 | """ |
| 55 | db_cfg = db_config() |
| 56 | db_cfg["ensure_indexes"] = ensure_indexes |
| 57 | connection = db_init.db_setup_with_retry(**db_cfg) |
| 58 | return connection |
| 59 | |
| 60 | |
| 61 | def db_teardown(): |