summaryrefslogtreecommitdiff
path: root/tests/test_connection_pool.py
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2019-01-27 12:24:03 -0800
committerAndy McCurdy <andy@andymccurdy.com>2019-01-27 12:24:03 -0800
commit5a2e26d2b0b554bfcd6875a968bcd8090b7f9b03 (patch)
tree7ab6f053294cda0c1c01b2c58b980f2513c239a8 /tests/test_connection_pool.py
parent04ddd34ec55a659b5bb8c1ac8c47899781b90a6d (diff)
downloadredis-py-5a2e26d2b0b554bfcd6875a968bcd8090b7f9b03.tar.gz
Connection URLs must have a valid scheme.
Fixes #969 Fixes #961
Diffstat (limited to 'tests/test_connection_pool.py')
-rw-r--r--tests/test_connection_pool.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_connection_pool.py b/tests/test_connection_pool.py
index b0dec67..ca56a76 100644
--- a/tests/test_connection_pool.py
+++ b/tests/test_connection_pool.py
@@ -308,6 +308,10 @@ class TestConnectionPoolURLParsing(object):
'password': None,
}
+ def test_invalid_scheme_raises_error(self):
+ with pytest.raises(ValueError):
+ redis.ConnectionPool.from_url('localhost')
+
class TestConnectionPoolUnixSocketURLParsing(object):
def test_defaults(self):