aboutsummaryrefslogtreecommitdiffstats
path: root/datamaps/tests/test_cli.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2021-01-17 21:05:41 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2021-01-17 21:25:25 +0000
commit353fed9586ad4c60d1ca7043cf5c6d3e22a00d34 (patch)
tree7792cc271e8ec62621c05441e2eabf7d6c1b6420 /datamaps/tests/test_cli.py
parent1c366183fc1dd880363956cc17a6d6159cecbd05 (diff)
added validationonly flag to import templates command
Diffstat (limited to '')
-rw-r--r--datamaps/tests/test_cli.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/datamaps/tests/test_cli.py b/datamaps/tests/test_cli.py
index a3a832f..aed9d56 100644
--- a/datamaps/tests/test_cli.py
+++ b/datamaps/tests/test_cli.py
@@ -20,6 +20,16 @@ def _copy_resources_to_input(config, directory):
)
+def test_can_run_validation_only_template_import(mock_config, resource_dir, caplog):
+ runner = CliRunner()
+ mock_config.initialise()
+ caplog.set_level(logging.INFO)
+ _copy_resources_to_input(mock_config, resource_dir)
+ result = runner.invoke(_import, ["templates", "-v"])
+ assert result.exit_code == 0
+ assert "No output file required." in [x[2] for x in caplog.record_tuples]
+
+
def test_import_from_user_defined_source_dir(
mock_config, resource_dir, caplog, temp_input_dir
):