ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm...@apache.org
Subject incubator-ariatosca git commit: ARIA-135-Add-plugin-field-to-MockTask
Date Thu, 30 Mar 2017 10:56:45 GMT
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-135-Add-plugin-field-to-MockTask [created] 97b69b177


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/97b69b17
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/97b69b17
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/97b69b17

Branch: refs/heads/ARIA-135-Add-plugin-field-to-MockTask
Commit: 97b69b17708aed778c7a7caa0b93e282c0e00264
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 13:56:36 2017 +0300

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


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/97b69b17/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/97b69b17/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..59c4c0d 100644
--- a/tests/orchestrator/workflows/executor/test_process_executor.py
+++ b/tests/orchestrator/workflows/executor/test_process_executor.py
@@ -113,11 +113,10 @@ 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
 
     @classmethod


Mime
View raw message