flask tests fail with older versions of python-werkzeug

Bug #1234291 reported by James Page
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-wsme (Ubuntu)
Fix Released
Medium
James Page
Saucy
Fix Released
Medium
James Page

Bug Description

nosetests tests/test_flask.py
.F........
======================================================================
FAIL: test_custom_clientside_error (test_flask.FlaskrTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jamespage/src/ubuntu/cloud-archive/havana/python-wsme-0.5b5/tests/test_flask.py", line 135, in test_custom_clientside_error
    assert json.loads(r.data)['faultstring'] == '403: Forbidden'
AssertionError:
-------------------- >> begin captured stdout << ---------------------
{u'debuginfo': None, u'faultcode': u'Server', u'faultstring': u"403: You're not allowed in there!"}

--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
wsme.api: ERROR: Server-side error: "403: You're not allowed in there!". Detail:
Traceback (most recent call last):

  File "/home/jamespage/src/ubuntu/cloud-archive/havana/python-wsme-0.5b5/wsmeext/flask.py", line 65, in wrapper
    result = f(*args, **kwargs)

  File "/home/jamespage/src/ubuntu/cloud-archive/havana/python-wsme-0.5b5/tests/test_flask.py", line 52, in model_secret
    abort(403, description="You're not allowed in there!")

  File "/usr/lib/python2.7/dist-packages/werkzeug/exceptions.py", line 525, in __call__
    raise self.mapping[code](*args, **kwargs)

Forbidden: 403: You're not allowed in there!

--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 10 tests in 0.023s

FAILED (failures=1)

This is not an issue per-say in Saucy; however this package is a backport target for the Ubuntu Cloud Archive and the test fails due to different handling of the description keyword in newer versions of python-werkzeug.

Dropping the custom description (which is then ignored in the actual test case) resolved the issues on 13.10 and 12.04.

James Page (james-page)
Changed in python-wsme (Ubuntu Saucy):
status: New → Fix Released
status: Fix Released → In Progress
importance: Undecided → Medium
assignee: nobody → James Page (james-page)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-wsme - 0.5b5-1ubuntu2

---------------
python-wsme (0.5b5-1ubuntu2) saucy; urgency=low

  * d/p/fix_403_test_case.patch: Fixup test case for 403 error code;
    older versions of python-werkzeug handle this differently which
    creates issues in the Ubuntu Cloud Archive (LP: #1234291).
 -- James Page <email address hidden> Wed, 02 Oct 2013 17:51:52 +0100

Changed in python-wsme (Ubuntu Saucy):
status: In Progress → 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.