Skip to content
Snippets Groups Projects
Commit 2bb84c90 authored by Gavin M. Roy's avatar Gavin M. Roy
Browse files

Catch bare exception in test

parent 5ba697ad
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -224,11 +224,11 @@ class SessionPublicMethodTests(testing.AsyncTestCase):
@testing.gen_test
def test_query_error_key_error(self):
obj = tornado_session.TornadoSession(io_loop=self.io_loop)
with self.assertRaises(KeyError):
with self.assertRaises(Exception):
yield obj.query('SELECT * FROM foo WHERE bar=%(baz)s', {})
 
@testing.gen_test
def test_query_error_index_error(self):
obj = tornado_session.TornadoSession(io_loop=self.io_loop)
with self.assertRaises(IndexError):
with self.assertRaises(Exception):
yield obj.query('SELECT * FROM foo WHERE bar=%s', [])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment