diff --git a/tests/test_config_utils.py b/tests/test_config_utils.py index 8292e802..548d3160 100644 --- a/tests/test_config_utils.py +++ b/tests/test_config_utils.py @@ -113,7 +113,7 @@ def test_env_config(monkeypatch): assert result == expected -def test_autoconfigure_read_both_from_file_and_env(monkeypatch): +def test_autoconfigure_read_both_from_file_and_env(monkeypatch, request): file_config = { 'database': {'host': 'test-host'}, 'backlog_reassign_delay': 5 @@ -136,7 +136,7 @@ def test_autoconfigure_read_both_from_file_and_env(monkeypatch): 'threads': None, }, 'database': { - 'backend': 'rethinkdb', + 'backend': request.config.getoption('--database-backend'), 'host': 'test-host', 'port': 4242, 'name': 'test-dbname', diff --git a/tests/test_core.py b/tests/test_core.py index 54b933ce..16974098 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1,5 +1,3 @@ -from collections import namedtuple - from rethinkdb.ast import RqlQuery import pytest @@ -9,7 +7,7 @@ import pytest def config(request, monkeypatch): config = { 'database': { - 'backend': 'rethinkdb', + 'backend': request.config.getoption('--database-backend'), 'host': 'host', 'port': 28015, 'name': 'bigchain',