Use assertRaisesMessage in tests where appropriate

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jbennett, Assigned: jezdez)

Tracking

Details

(Reporter)

Description

4 years ago
We don't have Python 2.7's assertRaisesRegexp, but we do have Django 1.4's assertRaisesMessage. We should audit our tests for places that could be cleaned up by use of assertRaisesMessage, and then clean them up.
(Assignee)

Updated

4 years ago
Assignee: nobody → jezdez
Status: NEW → ASSIGNED

Comment 1

4 years ago
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/415a5e2f0226965ed06f5ebbcca8398d6438b015
fix bug 1071083 - use assertRaiseMessage more instead of manually handling exception in tests.

Also uses the fail testcase method for false positives in a few places.

https://github.com/mozilla/kuma/commit/0eb4411fe1f4645fbb317fa194ffb94f98d73496
Merge pull request #2795 from jezdez/bug1071083

fix bug 1071083 - use assertRaiseMessage more instead of manually handling exception in tests.

Updated

4 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.