summaryrefslogtreecommitdiff
path: root/tests/test_monitor.py
diff options
context:
space:
mode:
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)