diff --git a/tests/test_connection_pooling.py b/tests/test_connection_pooling.py index b0cc35e3..5e49b355 100644 --- a/tests/test_connection_pooling.py +++ b/tests/test_connection_pooling.py @@ -94,7 +94,7 @@ def test_queue_pool(self): assert_equal(stats_logger.stats['disposed']['success'], 10) print "in test:", id(conns[-1]) - assert_raises(InvalidRequestError, conns[-1].return_to_pool) + conns[-1].return_to_pool() assert_equal(stats_logger.stats['checked_in'], 20) assert_equal(stats_logger.stats['disposed']['success'], 10) @@ -218,7 +218,7 @@ def test_queue_pool_no_prefill(self): assert_equal(stats_logger.stats['checked_in'], 20) assert_equal(stats_logger.stats['disposed']['success'], 10) - assert_raises(InvalidRequestError, conns[-1].return_to_pool) + conns[-1].return_to_pool() assert_equal(stats_logger.stats['checked_in'], 20) assert_equal(stats_logger.stats['disposed']['success'], 10) diff --git a/tests/test_pool_logger.py b/tests/test_pool_logger.py index 5ea4d2e9..b4e2e190 100644 --- a/tests/test_pool_logger.py +++ b/tests/test_pool_logger.py @@ -126,7 +126,7 @@ def test_pool(self): assert_equal(listener.stats['disposed']['success'], 10) print "in test:", id(conns[-1]) - assert_raises(InvalidRequestError, conns[-1].return_to_pool) + conns[-1].return_to_pool() assert_equal(listener.stats['checked_in'], 20) assert_equal(listener.stats['disposed']['success'], 10)