@pytest.mark.django_db(transaction=True, reset_sequences=True) def test_...(): pass
https://stackoverflow.com/questions/51504144/how-can-i-reset-a-django-test-database-ids-after-each-test