ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [02/17] incubator-ariatosca git commit: Change MockStorage methods to static
Date Wed, 05 Apr 2017 13:58:18 GMT
Change MockStorage methods to static


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

Branch: refs/heads/cli-tests
Commit: aa82ffa2dd2d7d6174395eda25cd622f40832a54
Parents: e3948ce
Author: Avia Efrat <avia@gigaspaces.com>
Authored: Wed Apr 5 16:26:41 2017 +0300
Committer: Avia Efrat <avia@gigaspaces.com>
Committed: Wed Apr 5 16:49:57 2017 +0300

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


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/aa82ffa2/tests/cli/test_service_templates.py
----------------------------------------------------------------------
diff --git a/tests/cli/test_service_templates.py b/tests/cli/test_service_templates.py
index d95e9ac..a6b5f12 100644
--- a/tests/cli/test_service_templates.py
+++ b/tests/cli/test_service_templates.py
@@ -14,16 +14,18 @@ def mock_storage(mocker):
 class MockStorage(object):
 
     def __init__(self):
-        self.service_template = MockServiceTemplateStorage()
+        self.service_template = MockServiceTemplateStorage
 
 
 class MockServiceTemplateStorage(object):
 
-    def list(self, **_):
+    @staticmethod
+    def list(**_):
         return [models.create_service_template('test_st'),
                 models.create_service_template('test_st2')]
 
-    def get(self, id):
+    @staticmethod
+    def get(id):
         st = models.create_service_template('test_st')
         if id == '1':  # no services and no description.
             st.services = []
@@ -109,5 +111,3 @@ class TestServiceTemplatesList(TestCliBase):
         monkeypatch.setattr(Environment, 'model_storage', mock_storage)
         self.invoke('service_templates list')
         mock_storage.service_template.list.assert_called_with(sort={'created_at': 'asc'})
-
-


Mime
View raw message