Opened 5 years ago

Closed 5 years ago

#18008 closed Bug (wontfix)

[patch] for broken test: test_loaddata_error_message

Reported by: hoffmaje Owned by: hoffmaje
Component: Core (Management commands) Version: master
Severity: Normal Keywords: unittest test IntegrityError assertRaises
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The attached diff fixes a broken test in tests/modeltests/fixtures/tests. call_command raises IntegrityError, that was not catched with assertRaises.

Attachments (1)

modeltests_fixtures_tests.diff (1.4 KB) - added by hoffmaje 5 years ago.

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by hoffmaje

comment:1 Changed 5 years ago by hoffmaje

Owner: changed from nobody to hoffmaje
Status: newassigned

comment:2 Changed 5 years ago by hoffmaje

Version: 1.4SVN

comment:3 Changed 5 years ago by hoffmaje

Summary: Fix broken test: test_loaddata_error_message[patch] for broken test: test_loaddata_error_message

comment:4 Changed 5 years ago by Claude Paroz

Please explain a little more why you think the current test is broken. Note that nobody has reported the test to fail, neither the CI servers (http://ci.djangoproject.com/). The loaddata command is currently catching all exceptions, so how are you able to intercept the IntegrityError in the test?

comment:5 Changed 5 years ago by hoffmaje

My fault, sorry, forgot to undo a todays morning trial to ease exception handling in loaddata.

comment:6 Changed 5 years ago by hoffmaje

Resolution: wontfix
Status: assignedclosed
Note: See TracTickets for help on using tickets.
Back to Top