Code

Opened 2 years ago

Closed 2 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 2 years ago.

Download all attachments as: .zip

Change History (7)

Changed 2 years ago by hoffmaje

comment:1 Changed 2 years ago by hoffmaje

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to hoffmaje
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 2 years ago by hoffmaje

  • Version changed from 1.4 to SVN

comment:3 Changed 2 years ago by hoffmaje

  • Summary changed from Fix broken test: test_loaddata_error_message to [patch] for broken test: test_loaddata_error_message

comment:4 Changed 2 years ago by claudep

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 2 years ago by hoffmaje

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

comment:6 Changed 2 years ago by hoffmaje

  • Resolution set to wontfix
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.