परीक्षण करते समय विफल रहा है, मैं अपने सर्वर सर्वर से डेटा को डंप करने की कोशिश कर रहा हूं ताकि मेरे देव सर्वर पर परीक्षण के रूप में उपयोग किया जा सके, लेकिन मुझे "./manage.py test" चलाने पर त्रुटियां मिल रही हैं देव सर्वर प्रोड सर्वर पर बनाई गई स्थिरता फ़ाइल निर्दिष्ट करता है।django फिक्स्चर (डंपडाटा से)
यहाँ की कोशिश करता रहा गूगल/stackoverflow खोज के आधार पर किया हैं:
# python manage.py dumpdata --indent=4 --natural
error when running tests: IntegrityError: (1062, "Duplicate entry 'cms-agencies' for key 'app_label'")
# python manage.py dumpdata --exclude contenttypes --indent=4
error when running tests: IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`test_current`.`django_admin_log`, CONSTRAINT `content_type_id_refs_id_288599e6` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`))')
# python manage.py dumpdata --exclude contenttypes --natural --indent=4
error when running tests: IntegrityError: (1062, "Duplicate entry '14-add_agencies' for key 'content_type_id'")
# python manage.py dumpdata --exclude contenttypes --exclude auth --indent=4
error when running tests: IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`test_current`.`django_admin_log`, CONSTRAINT `user_id_refs_id_c8665aa` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`))')
# python manage.py dumpdata --exclude contenttypes --exclude auth --natural --indent=4
error when running tests: IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`test_current_abril`.`django_admin_log`, CONSTRAINT `user_id_refs_id_c8665aa` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`))')
मैं भी हटाने के " 'init_command': 'SET storage_engine = InnoDB'" की कोशिश की settings.py से और अभी भी 1062 त्रुटियों मिला है।
मुझे इस समस्या को समझ में नहीं आता है। जब मैं फिक्स्चर लोड करता हूं तो प्रोजे सर्वर पर डीजेंगो बस डीबी को फिर से बनाना नहीं चाहिए?
सहमति, बस db –