With a factory like:
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
The model's id
field will by default start at 1. I want the id to start at a higher number, eg 50000.
Using UserFactory.reset_sequence(50000)
does not work
unless you add this line in the factory
id = factory.Sequence(lambda n: n)
I have a lot of tests that depend on the default id increment behavior so this way is a no go.