I'm using django 3.1 with SQLite DB. I'm using my django project as API, so django rest framework is installed as well. During my unittest (with pycharm) I've observed that in table main.django_content_type some models in my dev DB and test DB are ordered differently and have different IDs. For example defaultcategory and customcategory:
dev DB:
- admin logentry
- auth permission
- auth group
- contenttypes contenttype
- sessions session
- core customuser
- core historicalcustomuser
- authtoken token
- authtoken historicaltoken
- finances fixtransaction
- finances historicaldefaultcategory
- finances historicaltransfer
- finances historicaltransaction
- finances transaction
- finances fixtransfer
- finances historicalfixtransfer
- finances historicalcostaccount
- finances historicalfixtransaction
- finances transfer
- finances costaccount
- finances historicalcustomcategory
- finances defaultcategory
- finances customcategory
test DB:
- admin | log entry
- auth | permission
- auth | group
- contenttypes | content type
- sessions | session
- core | custom user
- core | historical custom user
- finances | cost account
- finances | transfer
- finances | transaction
- finances | historical transfer
- finances | historical transaction
- finances | historical fix transfer
- finances | historical fix transaction
- finances | historical default category
- finances | historical custom category
- finances | historical cost account
- finances | fix transfer
- finances | fix transaction
- finances | default category
- finances | custom category
- authtoken | Token
- authtoken | historical Token
Is there any way to sort all model during the test in the same way they are in dev DB?