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/05/07 09:33:11 UTC
incubator-ariatosca git commit: removed class
Repository: incubator-ariatosca
Updated Branches:
refs/heads/ARIA-160-Operation-toolbelt-unit-tests-fail-spordically 362939a55 -> e371281ab
removed class
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/e371281a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/e371281a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/e371281a
Branch: refs/heads/ARIA-160-Operation-toolbelt-unit-tests-fail-spordically
Commit: e371281ab0d3c9f1c5e77e720247e908ba1d3b9e
Parents: 362939a
Author: max-orlov <ma...@gigaspaces.com>
Authored: Sun May 7 12:33:07 2017 +0300
Committer: max-orlov <ma...@gigaspaces.com>
Committed: Sun May 7 12:33:07 2017 +0300
----------------------------------------------------------------------
tests/helpers.py | 38 -----------------------
tests/orchestrator/context/test_operation.py | 1 -
tests/orchestrator/context/test_toolbelt.py | 1 -
3 files changed, 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e371281a/tests/helpers.py
----------------------------------------------------------------------
diff --git a/tests/helpers.py b/tests/helpers.py
index 423e63f..472d696 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -14,8 +14,6 @@
# limitations under the License.
import os
-import tempfile
-import json
from . import ROOT_DIR
from .resources import DIR as RESOURCES_DIR
@@ -31,39 +29,3 @@ def get_resource_uri(*args):
def get_service_template_uri(*args):
return os.path.join(RESOURCES_DIR, 'service-templates', *args)
-
-
-class FilesystemDataHolder(object):
- _tmpfile = tempfile.NamedTemporaryFile('w')
-
- def _load(self):
- return json.load(open(self._tmpfile.name))
-
- def _dump(self, value):
- return json.dump(value, open(self._tmpfile.name, 'w'))
-
- def __init__(self):
- self.clear()
-
- def __setitem__(self, key, value):
- dict_ = self._load()
- dict_[key] = value
- self._dump(dict_)
-
- def __getitem__(self, item):
- return self._load()[item]
-
- def __iter__(self):
- return iter(self._load())
-
- def clear(self):
- self._dump({})
-
- def get(self, item, default=None):
- return self._load().get(item, default)
-
- def setdefault(self, key, value):
- dict_ = self._load()
- return_value = dict_.setdefault(key, value)
- self._dump(dict_)
- return return_value
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e371281a/tests/orchestrator/context/test_operation.py
----------------------------------------------------------------------
diff --git a/tests/orchestrator/context/test_operation.py b/tests/orchestrator/context/test_operation.py
index 8303bbe..942583a 100644
--- a/tests/orchestrator/context/test_operation.py
+++ b/tests/orchestrator/context/test_operation.py
@@ -31,7 +31,6 @@ import tests
from tests import (
mock,
storage,
- helpers
)
from . import (
op_path,
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e371281a/tests/orchestrator/context/test_toolbelt.py
----------------------------------------------------------------------
diff --git a/tests/orchestrator/context/test_toolbelt.py b/tests/orchestrator/context/test_toolbelt.py
index ba0dc0b..5e63da3 100644
--- a/tests/orchestrator/context/test_toolbelt.py
+++ b/tests/orchestrator/context/test_toolbelt.py
@@ -23,7 +23,6 @@ from aria.orchestrator.workflows.executor import thread
from tests import (
mock,
storage,
- helpers
)
from . import (
op_path,