summaryrefslogtreecommitdiff
path: root/tests/test_monitor.py
diff options
context:
space:
mode:
authorChayim <chayim@users.noreply.github.com>2021-11-10 15:54:46 +0200
committerGitHub <noreply@github.com>2021-11-10 15:54:46 +0200
commit5be96b96d6059a61d0fd50f96a32db99975408ed (patch)
treea9c6d6c49b67211f115c40cb4ca67ab40d84d99a /tests/test_monitor.py
parent776dd5938a511052d5ce586dce66ac3508fc2e0e (diff)
downloadredis-py-5be96b96d6059a61d0fd50f96a32db99975408ed.tar.gz
Unit test fixes to carry pytest options through all tests (#1696)
Diffstat (limited to 'tests/test_monitor.py')
-rw-r--r--tests/test_monitor.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_monitor.py b/tests/test_monitor.py
index 1013202..bbb7fb7 100644
--- a/tests/test_monitor.py
+++ b/tests/test_monitor.py
@@ -9,11 +9,12 @@ class TestMonitor:
assert response is None
def test_response_values(self, r):
+ db = r.connection_pool.connection_kwargs.get('db', 0)
with r.monitor() as m:
r.ping()
response = wait_for_command(r, m, 'PING')
assert isinstance(response['time'], float)
- assert response['db'] == 9
+ assert response['db'] == db
assert response['client_type'] in ('tcp', 'unix')
assert isinstance(response['client_address'], str)
assert isinstance(response['client_port'], str)