404 test masked by near duplicate 405 test

Bug #848837 reported by Jonathan Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restfulclient
Fix Released
Low
Colin Watson

Bug Description

In src/lazr/restfulclient/tests/test_error.py:

    def test_error_for_404(self):
        """Make sure a 404 response code yields Not Found."""
        self.error_for_status(404, NotFound, "error message")

    def test_error_for_404(self):
        """Make sure a 405 response code yields MethodNotAllowed."""
        self.error_for_status(405, MethodNotAllowed, "error message")

The second test should be renamed to test_error_for_405 in order to allow the real 404 test to run.

Related branches

Revision history for this message
Jonathan Lange (jml) wrote :

It's not strictly a bug, but while there, please also remove the duplicate 'test_no_error_for_2xx'.

Aaron Bentley (abentley)
Changed in lazr.restfulclient:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Colin Watson (cjwatson) wrote :

Both done in trunk, thanks.

Changed in lazr.restfulclient:
assignee: nobody → Colin Watson (cjwatson)
status: Triaged → Fix Committed
Revision history for this message
Colin Watson (cjwatson) wrote :

Fixed in lazr.restfulclient 0.13.5.

Changed in lazr.restfulclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.