You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by av...@apache.org on 2017/04/05 13:58:27 UTC

[11/17] incubator-ariatosca git commit: No need for json.dumps while printing the names of the services

No need for json.dumps while printing the names of the services


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

Branch: refs/heads/cli-tests
Commit: d346d330df35b9ec5fdee4e947ae39fde05cc931
Parents: 43518c7
Author: Avia Efrat <av...@gigaspaces.com>
Authored: Wed Apr 5 12:04:01 2017 +0300
Committer: Avia Efrat <av...@gigaspaces.com>
Committed: Wed Apr 5 16:49:57 2017 +0300

----------------------------------------------------------------------
 aria/cli/commands/service_templates.py | 2 +-
 tests/cli/test_service_templates.py    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d346d330/aria/cli/commands/service_templates.py
----------------------------------------------------------------------
diff --git a/aria/cli/commands/service_templates.py b/aria/cli/commands/service_templates.py
index a324131..d11ca08 100644
--- a/aria/cli/commands/service_templates.py
+++ b/aria/cli/commands/service_templates.py
@@ -66,7 +66,7 @@ def show(service_template_id, model_storage, logger):
         logger.info('{0}\n'.format(service_template_dict['description'].encode('UTF-8') or ''))
 
     logger.info('Existing services:')
-    logger.info('{0}\n'.format(json.dumps([d['name'] for d in services])))
+    logger.info('{0}\n'.format([s['name'] for s in services]))
 
 
 @service_templates.command(name='list',

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d346d330/tests/cli/test_service_templates.py
----------------------------------------------------------------------
diff --git a/tests/cli/test_service_templates.py b/tests/cli/test_service_templates.py
index d35139e..e52207d 100644
--- a/tests/cli/test_service_templates.py
+++ b/tests/cli/test_service_templates.py
@@ -51,4 +51,4 @@ class TestServiceTemplatesShow(TestCliBase):
         outcome = self.invoke('service_templates show 3')
 
         assert 'Description:\ntest_description' in self.logger_output_string
-        assert 'Existing services:\n["test_s"]' in self.logger_output_string
+        assert "Existing services:\n['test_s']" in self.logger_output_string