diff options
Diffstat (limited to 'tests/conftest.py')
-rw-r--r-- | tests/conftest.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 4398175..4a745df 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -24,7 +24,7 @@ def pytest_addoption(parser): action="store", help="Redis connection string," " defaults to `%(default)s`") - parser.addoption('--master-host', default=DEFAULT_REDIS_MASTER_HOST, + parser.addoption('--redis-master-host', default=DEFAULT_REDIS_MASTER_HOST, action="store", help="Redis master hostname," " defaults to `%(default)s`") @@ -163,6 +163,11 @@ def mock_cluster_resp_slaves(request, **kwargs): return _gen_cluster_mock_resp(r, response) +@pytest.fixture(scope="module") +def master_host(request): + yield request.config.getoption("--redis-master-host") + + def wait_for_command(client, monitor, command): # issue a command with a key name that's local to this process. # if we find a command with our key before the command we're waiting |