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
=== modified file 'acceptance/tests/fixtures/test_fixture_setup.py'
--- acceptance/tests/fixtures/test_fixture_setup.py 2013-06-11 20:39:49 +0000
+++ acceptance/tests/fixtures/test_fixture_setup.py 2013-07-11 02:14:28 +0000
@@ -38,7 +38,7 @@
38 error = self.assertRaises(38 error = self.assertRaises(
39 AssertionError, self.useFixture, fixture)39 AssertionError, self.useFixture, fixture)
40 self.assertEqual(40 self.assertEqual(
41 error.message,41 str(error),
42 'Failed to register the user using the Ubuntu SSO API.')42 'Failed to register the user using the Ubuntu SSO API.')
4343
4444
@@ -138,7 +138,7 @@
138 error = self.assertRaises(138 error = self.assertRaises(
139 fixture_setup.PreconditionsError, self.useFixture, fixture)139 fixture_setup.PreconditionsError, self.useFixture, fixture)
140 self.assertEqual(140 self.assertEqual(
141 error.message, 'We can only change the brand on the devel server.')141 str(error), 'We can only change the brand on the devel server.')
142142
143143
144class DevicesFixturesTestCase(base.SSTTestCaseWithLogIn):144class DevicesFixturesTestCase(base.SSTTestCaseWithLogIn):