(num_models: int)
| 12 | async def test_creating_models_individually(aio_benchmark, num_models: int): |
| 13 | @aio_benchmark |
| 14 | async def create(num_models: int): |
| 15 | authors = [] |
| 16 | for idx in range(0, num_models): |
| 17 | author = await Author.objects.create( |
| 18 | name="".join(random.sample(string.ascii_letters, 5)), |
| 19 | score=int(random.random() * 100), |
| 20 | ) |
| 21 | authors.append(author) |
| 22 | return authors |
| 23 | |
| 24 | authors = create(num_models) |
| 25 | for author in authors: |
no test coverage detected