ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From emblempar...@apache.org
Subject [06/14] incubator-ariatosca git commit: ARIA-135-Add-plugin-field-to-MockTask
Date Fri, 07 Apr 2017 00:54:59 GMT
ARIA-135-Add-plugin-field-to-MockTask


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

Branch: refs/heads/ARIA-92-plugin-in-implementation-string
Commit: 4400e302311f51da48fd0c66a58dfa1b7e66a80e
Parents: 941d85c
Author: max-orlov <maxim@gigaspaces.com>
Authored: Thu Mar 30 13:56:36 2017 +0300
Committer: max-orlov <maxim@gigaspaces.com>
Committed: Thu Mar 30 14:09:29 2017 +0300

----------------------------------------------------------------------
 tests/orchestrator/workflows/executor/test_executor.py       | 7 +++----
 .../orchestrator/workflows/executor/test_process_executor.py | 8 ++++----
 2 files changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4400e302/tests/orchestrator/workflows/executor/test_executor.py
----------------------------------------------------------------------
diff --git a/tests/orchestrator/workflows/executor/test_executor.py b/tests/orchestrator/workflows/executor/test_executor.py
index 9dde1ce..d84d1ec 100644
--- a/tests/orchestrator/workflows/executor/test_executor.py
+++ b/tests/orchestrator/workflows/executor/test_executor.py
@@ -85,12 +85,11 @@ class MockContext(object):
 
     def __init__(self, *args, **kwargs):
         self.logger = logging.getLogger()
+        self.task = type('SubprocessMockTask', (object, ), {'plugin': None})
+        self.serialization_dict = {'context_cls': self.__class__, 'context': {}}
 
     def __getattr__(self, item):
-        if item == 'serialization_dict':
-            return {'context_cls': self.__class__, 'context': {}}
-        else:
-            return None
+        return None
 
     @classmethod
     def deserialize_from_dict(cls, **kwargs):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4400e302/tests/orchestrator/workflows/executor/test_process_executor.py
----------------------------------------------------------------------
diff --git a/tests/orchestrator/workflows/executor/test_process_executor.py b/tests/orchestrator/workflows/executor/test_process_executor.py
index 0edd0a5..436e7b6 100644
--- a/tests/orchestrator/workflows/executor/test_process_executor.py
+++ b/tests/orchestrator/workflows/executor/test_process_executor.py
@@ -113,17 +113,17 @@ class MockContext(object):
 
     def __init__(self, *args, **kwargs):
         self.logger = logging.getLogger('mock_logger')
+        self.task = type('SubprocessMockTask', (object, ), {'plugin': None})
+        self.serialization_dict = {'context_cls': self.__class__, 'context': {}}
 
     def __getattr__(self, item):
-        if item == 'serialization_dict':
-            return {'context_cls': self.__class__, 'context': {}}
-        else:
-            return None
+        return None
 
     @classmethod
     def deserialize_from_dict(cls, **kwargs):
         return cls()
 
+
 class MockTask(object):
 
     INFINITE_RETRIES = aria_models.Task.INFINITE_RETRIES


Mime
View raw message