Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-160-Operation-toolbelt-unit-tests-fail-spordically e371281ab -> a09fab1ab (forced update)
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/a09fab1a Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/a09fab1a Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/a09fab1a Branch: refs/heads/ARIA-160-Operation-toolbelt-unit-tests-fail-spordically Commit: a09fab1ab7247669a3d0bdc13b9aaa480ed88b4b Parents: 362939a Author: max-orlov <[email protected]> Authored: Sun May 7 12:33:07 2017 +0300 Committer: max-orlov <[email protected]> Committed: Sun May 7 13:05:48 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/a09fab1a/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/a09fab1a/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/a09fab1a/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,
