aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark/core
diff options
context:
space:
mode:
authorEmma Foley <emma.l.foley@intel.com>2018-04-27 10:30:20 +0000
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-06-11 08:30:17 +0100
commit98294f2c8153f663c3b3a4e4cb98910e9d5cb602 (patch)
tree11e5d42de9b84dff8a800657a5fc3b9c62464550 /yardstick/tests/unit/benchmark/core
parent8068adbf0aa5275f9c4cd4e298f1868834242e9a (diff)
Move tests: unit/network_services/vnf_generic
* Fix pylint errors * Add TODOs Some errors are ignored locally, as they were a symptom of other problems. These issues have been flagged with a TODO, and should be fixed later. JIRA: YARDSTICK-837 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Change-Id: I3d95537a64bde923703421510d27bac0d6dd92bd
Diffstat (limited to 'yardstick/tests/unit/benchmark/core')
-rw-r--r--yardstick/tests/unit/benchmark/core/test_task.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/yardstick/tests/unit/benchmark/core/test_task.py b/yardstick/tests/unit/benchmark/core/test_task.py
index e7d2c70b7..7468368df 100644
--- a/yardstick/tests/unit/benchmark/core/test_task.py
+++ b/yardstick/tests/unit/benchmark/core/test_task.py
@@ -17,6 +17,7 @@ import six
import unittest
import uuid
+from yardstick.benchmark.contexts import base
from yardstick.benchmark.contexts import dummy
from yardstick.benchmark.core import task
from yardstick.common import constants as consts
@@ -358,9 +359,10 @@ key2:
}
@staticmethod
- def _remove_context(context):
- if context:
+ def _remove_contexts():
+ for context in base.Context.list:
context._delete_context()
+ base.Context.list = []
def test__change_node_names(self):
@@ -376,7 +378,7 @@ key2:
}
my_context = dummy.DummyContext()
- self.addCleanup(self._remove_context, my_context)
+ self.addCleanup(self._remove_contexts)
my_context.init(ctx_attrs)
expected_scenario = {
@@ -419,7 +421,7 @@ key2:
}
my_context = dummy.DummyContext()
- self.addCleanup(self._remove_context, my_context)
+ self.addCleanup(self._remove_contexts)
my_context.init(ctx_attrs)
scenario = copy.deepcopy(self.scenario)
@@ -435,7 +437,7 @@ key2:
}
my_context = dummy.DummyContext()
- self.addCleanup(self._remove_context, my_context)
+ self.addCleanup(self._remove_contexts)
my_context.init(ctx_attrs)
scenario = copy.deepcopy(self.scenario)
scenario['options'] = None
@@ -450,7 +452,7 @@ key2:
}
my_context = dummy.DummyContext()
- self.addCleanup(self._remove_context, my_context)
+ self.addCleanup(self._remove_contexts)
my_context.init(ctx_attrs)
scenario = copy.deepcopy(self.scenario)
scenario['options']['server_name'] = None