Skip to content

Create Test Cases to Insert Over 1,000 Records in Each DB Table to Optimize API Performance #498

@ghost

Description

Read about https://pypi.org/project/django-faker/

from django_faker import Faker
# this Populator is only a function thats return a django_faker.populator.Populator instance
# correctly initialized with a faker.generator.Generator instance, configured as above
populator = Faker.getPopulator()

from myapp.models import Game, Player
populator.addEntity(Game,5)
populator.addEntity(Player,10)

insertedPks = populator.execute()

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions