summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xredis/connection.py2
-rw-r--r--tests/test_connection_pool.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/redis/connection.py b/redis/connection.py
index 99c5f23..28620c3 100755
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -1039,7 +1039,7 @@ class ConnectionPool(object):
url_options['connection_class'] = SSLConnection
else:
valid_schemes = ', '.join(('redis://', 'rediss://', 'unix://'))
- raise ValueError('Redis URL must specify one of the following'
+ raise ValueError('Redis URL must specify one of the following '
'schemes (%s)' % valid_schemes)
# last shot at the db value
diff --git a/tests/test_connection_pool.py b/tests/test_connection_pool.py
index 613ca23..080e3df 100644
--- a/tests/test_connection_pool.py
+++ b/tests/test_connection_pool.py
@@ -393,8 +393,12 @@ class TestConnectionPoolURLParsing(object):
}
def test_invalid_scheme_raises_error(self):
- with pytest.raises(ValueError):
+ with pytest.raises(ValueError) as cm:
redis.ConnectionPool.from_url('localhost')
+ assert str(cm.value) == (
+ 'Redis URL must specify one of the following schemes '
+ '(redis://, rediss://, unix://)'
+ )
class TestConnectionPoolUnixSocketURLParsing(object):