Repository: incubator-ariatosca
Updated Branches:
  refs/heads/cli-tests a80ffcf62 -> 965b69e0b


Add test for service-templates create-archive


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/b469b271
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/b469b271
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/b469b271

Branch: refs/heads/cli-tests
Commit: b469b27196d0ef36129b57e555f9306cbe39ebdd
Parents: a80ffcf
Author: Avia Efrat <[email protected]>
Authored: Wed Apr 12 11:35:40 2017 +0300
Committer: Avia Efrat <[email protected]>
Committed: Wed Apr 12 11:35:40 2017 +0300

----------------------------------------------------------------------
 tests/cli/test_service_templates.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b469b271/tests/cli/test_service_templates.py
----------------------------------------------------------------------
diff --git a/tests/cli/test_service_templates.py 
b/tests/cli/test_service_templates.py
index 48ffa30..46ba2ac 100644
--- a/tests/cli/test_service_templates.py
+++ b/tests/cli/test_service_templates.py
@@ -1,4 +1,4 @@
-from aria.cli import service_template_utils
+from aria.cli import service_template_utils, csar
 from aria.cli.env import Environment
 from aria.cli.exceptions import AriaCliError
 from aria.core import Core
@@ -163,3 +163,11 @@ class TestServiceTemplatesValidate(TestCliBase):
         assert_exception_raised(
             self.invoke('service_templates validate stubpath'),
             expected_exception=AriaCliError)
+
+
+class TestServiceTemplatesCreateArchive(TestCliBase):
+
+    def test_create_archive_successful(self, monkeypatch, mock_object):
+        monkeypatch.setattr(csar, 'write', mock_object)
+        self.invoke('service_templates create_archive stubpath stubdest')
+        assert 'Csar archive created at stubdest' in self.logger_output_string

Reply via email to