Merge "pylint fixes: remove redundant parens, fix comparison order"
[yardstick.git] / yardstick / vTC / apexlake / tests / multi_tenancy_throughput_benchmark_test.py
index babf04a..39b38d7 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-__author__ = 'gpetralx'
-
-
+from __future__ import absolute_import
 import unittest
 import mock
 import os
 import experimental_framework.common as common
 from experimental_framework.benchmarks \
     import multi_tenancy_throughput_benchmark as bench
+from six.moves import range
+
+__author__ = 'gpetralx'
 
 
 class MockDeploymentUnit(object):
+
     def deploy_heat_template(self, temp_file, stack_name, heat_param):
         pass
 
@@ -36,6 +38,7 @@ def get_deployment_unit():
 
 
 class TestMultiTenancyThroughputBenchmark(unittest.TestCase):
+
     def setUp(self):
         name = 'benchmark'
         params = dict()
@@ -48,9 +51,9 @@ class TestMultiTenancyThroughputBenchmark(unittest.TestCase):
     def test_get_features_for_sanity(self):
         output = self.benchmark.get_features()
         self.assertIsInstance(output, dict)
-        self.assertIn('parameters', output.keys())
-        self.assertIn('allowed_values', output.keys())
-        self.assertIn('default_values', output.keys())
+        self.assertIn('parameters', list(output.keys()))
+        self.assertIn('allowed_values', list(output.keys()))
+        self.assertIn('default_values', list(output.keys()))
         self.assertIsInstance(output['parameters'], list)
         self.assertIsInstance(output['allowed_values'], dict)
         self.assertIsInstance(output['default_values'], dict)
@@ -78,6 +81,8 @@ class TestMultiTenancyThroughputBenchmark(unittest.TestCase):
         heat_param = dict()
         heat_param['cores'] = num_of_cores
         heat_param['memory'] = amount_of_ram
+        heat_param['network'] = ''
+        heat_param['subnet'] = ''
         neighbor_stack_names = list()
 
         deployment_unit.\