From 5be96b96d6059a61d0fd50f96a32db99975408ed Mon Sep 17 00:00:00 2001 From: Chayim Date: Wed, 10 Nov 2021 15:54:46 +0200 Subject: Unit test fixes to carry pytest options through all tests (#1696) --- tests/test_monitor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/test_monitor.py') 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) -- cgit v1.2.1