If duplicate primary keys generated an error while loading the instrument, many existing tests will be violated. Sometimes the device must contain this error, so it can be tested against.
You can write general tests to check for the problems you mentioned:
, , , . , (, YourObject.objects.get(pk=1) YourObject.objects.get(name='My Test Entry').
, , YourObject.objects.all().aggregate(Count('id', distinct=True)) YourObject.objects.all().aggregate(Count('id')). , .
, . manage.py dumpdata .
. .
- loaddata. , fixtures = [] , . , loaddata , . , " " 2 .
Django Django .