summaryrefslogtreecommitdiffstats
path: root/dcae-cli/dcae_cli/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'dcae-cli/dcae_cli/conftest.py')
-rw-r--r--dcae-cli/dcae_cli/conftest.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/dcae-cli/dcae_cli/conftest.py b/dcae-cli/dcae_cli/conftest.py
index 5df4cc7..7a00732 100644
--- a/dcae-cli/dcae_cli/conftest.py
+++ b/dcae-cli/dcae_cli/conftest.py
@@ -56,3 +56,13 @@ def mock_cli_config(monkeypatch):
monkeypatch.setattr(dcae_cli.util.config, "get_config", fake_get_config)
monkeypatch.setattr(dcae_cli.util.profiles, "get_profiles", fake_get_profiles)
+
+@pytest.fixture
+def mock_db_url(tmpdir):
+ """Fixture to provide mock db url
+
+ This url is intended to be the location of where to place the local sqlite
+ databases for each unit test"""
+ dbname="dcae_cli.test.db"
+ config_dir = tmpdir.mkdir("config")
+ return "/".join(["sqlite://", str(config_dir), dbname])