You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by mx...@apache.org on 2017/04/10 09:51:21 UTC

[12/18] incubator-ariatosca git commit: Clean up the code a bit

Clean up the code a bit


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

Branch: refs/heads/logger_task
Commit: e898e1064fa51661c3ba39c711208dd58f856b3a
Parents: 314f09e
Author: Avia Efrat <av...@gigaspaces.com>
Authored: Thu Apr 6 16:25:47 2017 +0300
Committer: Avia Efrat <av...@gigaspaces.com>
Committed: Thu Apr 6 17:29:56 2017 +0300

----------------------------------------------------------------------
 tests/cli/test_service_templates.py | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e898e106/tests/cli/test_service_templates.py
----------------------------------------------------------------------
diff --git a/tests/cli/test_service_templates.py b/tests/cli/test_service_templates.py
index f79b22e..d357fad 100644
--- a/tests/cli/test_service_templates.py
+++ b/tests/cli/test_service_templates.py
@@ -94,9 +94,8 @@ class TestServiceTemplatesShow(TestCliBase):
 
         # TODO consider removing as it does not seem to test the cli but rather the message received
         # from the storage
-        outcome = self.invoke('service_templates show 5')
         assert_exception_raised(
-            outcome,
+            self.invoke('service_templates show 5'),
             expected_exception=storage_exceptions.NotFoundError,
             expected_msg='Requested `ServiceTemplate` with ID `5` was not found')
 
@@ -146,9 +145,8 @@ class TestServiceTemplatesStore(TestCliBase):
                             raise_exception(storage_exceptions.NotFoundError,
                                             msg='UNIQUE constraint failed'))
 
-        outcome = self.invoke('service_templates store stubpath test_st')
         assert_exception_raised(
-            outcome,
+            self.invoke('service_templates store stubpath test_st'),
             expected_exception=AriaCliError,
             expected_msg='Could not store service template `test_st`\n'
                          'There already a exists a service template with the same name')
@@ -160,9 +158,8 @@ class TestServiceTemplatesStore(TestCliBase):
                             'create_service_template',
                             raise_exception(storage_exceptions.NotFoundError))
 
-        outcome = self.invoke('service_templates store stubpath test_st')
         assert_exception_raised(
-            outcome,
+            self.invoke('service_templates store stubpath test_st'),
             expected_exception=AriaCliError)