()
| 27 | |
| 28 | @create_drop_database(base_config=ormar_base_config) |
| 29 | async def run_query(): |
| 30 | # create multiple instances at once with bulk_create |
| 31 | await ToDo.objects.bulk_create( |
| 32 | [ |
| 33 | ToDo(text="Buy the groceries."), |
| 34 | ToDo(text="Call Mum.", completed=True), |
| 35 | ToDo(text="Send invoices.", completed=True), |
| 36 | ] |
| 37 | ) |
| 38 | |
| 39 | todoes = await ToDo.objects.all() |
| 40 | assert len(todoes) == 3 |
| 41 | |
| 42 | |
| 43 | asyncio.run(run_query()) |
no test coverage detected