Unicode error when assertMessageCount() fails

Bug #1315031 reported by Julie Pichon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Julie Pichon

Bug Description

If setting assertMessageCount() to the wrong count (for instance, assertMessageCount(res, error=2) when only 1 message is expected), it fails with the following error:

  File "/home/jpichon/devel/horizon/horizon/test/helpers.py", line 166, in assertMessageCount
    ", ".join(msgs))
 TypeError: sequence item 0: expected string, __proxy__ found

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/91580

Changed in horizon:
status: New → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/91580
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=ed9faf84d188fce23c9f5c15f656011f544e88af
Submitter: Jenkins
Branch: master

commit ed9faf84d188fce23c9f5c15f656011f544e88af
Author: Julie Pichon <email address hidden>
Date: Thu May 1 15:50:32 2014 +0100

    Fix unicode error when assertMessageCount() fails

    When assertMessageCount() fails, we display the list of messages that
    were included in the response. However because the messages are lazily
    translated by default, this would fail and show the following error
    instead:

     TypeError: sequence item 0: expected string, __proxy__ found

    Change-Id: I1d2ed97b66428e0ee1aac783c8370ab3ea665b29
    Closes-Bug: #1315031

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-1 → 2014.2
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.