summaryrefslogtreecommitdiffstats
path: root/dcae-cli/dcae_cli/commands
diff options
context:
space:
mode:
Diffstat (limited to 'dcae-cli/dcae_cli/commands')
-rw-r--r--dcae-cli/dcae_cli/commands/tests/test_component_cmd.py5
-rw-r--r--dcae-cli/dcae_cli/commands/tests/test_data_format_cmd.py6
-rw-r--r--dcae-cli/dcae_cli/commands/tests/test_profiles_cmd.py4
3 files changed, 8 insertions, 7 deletions
diff --git a/dcae-cli/dcae_cli/commands/tests/test_component_cmd.py b/dcae-cli/dcae_cli/commands/tests/test_component_cmd.py
index 96f99de..67769eb 100644
--- a/dcae-cli/dcae_cli/commands/tests/test_component_cmd.py
+++ b/dcae-cli/dcae_cli/commands/tests/test_component_cmd.py
@@ -39,9 +39,10 @@ def _get_spec(path):
return json.load(file)
-def test_comp_docker(mock_cli_config, obj=None):
+def test_comp_docker(mock_cli_config, mock_db_url, obj=None):
- obj = {'catalog': MockCatalog(purge_existing=True, db_name='dcae_cli.test.db', enforce_image=False),
+ obj = {'catalog': MockCatalog(purge_existing=True, db_name='dcae_cli.test.db',
+ enforce_image=False, db_url=mock_db_url),
'config': {'user': 'test-user'}}
df_kpi = os.path.join(TEST_DIR, 'mocked_components', 'collector', 'vnf-kpi.format.json')
diff --git a/dcae-cli/dcae_cli/commands/tests/test_data_format_cmd.py b/dcae-cli/dcae_cli/commands/tests/test_data_format_cmd.py
index 9a71e41..a291a74 100644
--- a/dcae-cli/dcae_cli/commands/tests/test_data_format_cmd.py
+++ b/dcae-cli/dcae_cli/commands/tests/test_data_format_cmd.py
@@ -40,9 +40,9 @@ def _get_spec(path):
return json.load(file)
-def test_basic(mock_cli_config):
-
- obj = {'catalog': MockCatalog(purge_existing=True, db_name='dcae_cli.test.db', enforce_image=False),
+def test_basic(mock_cli_config, mock_db_url, tmpdir):
+ obj = {'catalog': MockCatalog(purge_existing=True, db_name='dcae_cli.test.db',
+ enforce_image=False, db_url=mock_db_url),
'config': {'user': 'test-user'}}
runner = CliRunner()
diff --git a/dcae-cli/dcae_cli/commands/tests/test_profiles_cmd.py b/dcae-cli/dcae_cli/commands/tests/test_profiles_cmd.py
index 4380b13..be89722 100644
--- a/dcae-cli/dcae_cli/commands/tests/test_profiles_cmd.py
+++ b/dcae-cli/dcae_cli/commands/tests/test_profiles_cmd.py
@@ -34,12 +34,12 @@ from dcae_cli.util import profiles
from dcae_cli.util import config
-def test_basic(monkeypatch, tmpdir):
+def test_basic(monkeypatch, tmpdir, mock_db_url):
runner = CliRunner()
# Setup config
- test_db_url = "sqlite:///{0}/dcae_cli.db".format(util.get_app_dir())
+ test_db_url = mock_db_url
config_dict = { "user": "ninny", "active_profile": "fake-solutioning",
"db_url": test_db_url, "cli_version": "2.0.0" }
config_file = tmpdir.join("config.json")