Skip to content

Commit

Permalink
Fix test to not user assertRaises context manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudi Giesler committed Apr 7, 2016
1 parent ecf0da1 commit 9771515
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions vumi/persist/tests/test_redis_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ def test_no_key_prefix_sub_manager(self):
def test_client_and_client_proxy_disallowed(self):
'''If both the client and the client proxy are specified when creating
a manager, then an exception should be raised.'''
with self.assertRaises(AssertionError) as e:
Manager(object(), None, None, client_proxy=object())
e = self.assertRaises(
AssertionError, Manager, object(), None, None,
client_proxy=object())
self.assertEqual(
str(e.exception),
str(e),
'Only one of client or client_proxy may be specified')

0 comments on commit 9771515

Please sign in to comment.