summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2020-04-28 13:26:19 -0700
committerGitHub <noreply@github.com>2020-04-28 13:26:19 -0700
commit09da3ad07f26350d093929fe1ea6eaaca79ab944 (patch)
tree7f59e02870060c369cce8742ce4a0c67531f0438
parent05548a373f780c512bc7f7a12a18173d19437b12 (diff)
downloadredis-py-09da3ad07f26350d093929fe1ea6eaaca79ab944.tar.gz
Fix typo (missing space) in exception message (#1334)
-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):