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
}
@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):
}
my_context = dummy.DummyContext()
- self.addCleanup(self._remove_context, my_context)
+ self.addCleanup(self._remove_contexts)
my_context.init(ctx_attrs)
expected_scenario = {
}
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)
}
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
}
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