Merge lp:~elopio/canonical-identity-provider/exception_warnings into lp:canonical-identity-provider/release

Proposed by Leo Arias
Status: Merged
Approved by: Natalia Bidart
Approved revision: no longer in the source branch.
Merged at revision: 960
Proposed branch: lp:~elopio/canonical-identity-provider/exception_warnings
Merge into: lp:canonical-identity-provider/release
Diff against target: 21 lines (+2/-2)
1 file modified
acceptance/tests/fixtures/test_fixture_setup.py (+2/-2)
To merge this branch: bzr merge lp:~elopio/canonical-identity-provider/exception_warnings
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Review via email: mp+174094@code.launchpad.net

Commit message

Accessing the message attribute of the exception throws a warning. Use str instead.

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'acceptance/tests/fixtures/test_fixture_setup.py'
2--- acceptance/tests/fixtures/test_fixture_setup.py 2013-06-11 20:39:49 +0000
3+++ acceptance/tests/fixtures/test_fixture_setup.py 2013-07-11 02:14:28 +0000
4@@ -38,7 +38,7 @@
5 error = self.assertRaises(
6 AssertionError, self.useFixture, fixture)
7 self.assertEqual(
8- error.message,
9+ str(error),
10 'Failed to register the user using the Ubuntu SSO API.')
11
12
13@@ -138,7 +138,7 @@
14 error = self.assertRaises(
15 fixture_setup.PreconditionsError, self.useFixture, fixture)
16 self.assertEqual(
17- error.message, 'We can only change the brand on the devel server.')
18+ str(error), 'We can only change the brand on the devel server.')
19
20
21 class DevicesFixturesTestCase(base.SSTTestCaseWithLogIn):