Problem description - when trying to run tests in the project, the following error is displayed - Could not load contenttypes.ContentType(pk=6): duplicate key value violates unique constraint "django_content_type_app_label_model_76bd3d3b_uniq"
DETAIL: Key (app_label, model)=(assignment_handler, worker) already exists.
Done - checked the current record in the django_content_type: table via a SQL query and there is indeed such a record. It is not clear to me why there is a uniqueness conflict, if there is one, the data is loaded from the test fixture during the tests, but it should not be loaded into the main database in any way.
#π unittest malfunctioning
4 messages Β· Page 1 of 1 (latest)
@true kraken
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
@true kraken
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.