aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark/contexts
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-01-26 10:54:55 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-26 10:54:55 +0000
commit868db57177cdbbebf8d160ca049cdf81fda3a2f4 (patch)
treeda10fba406c08c5b0807adfffc3100ad0492f220 /tests/unit/benchmark/contexts
parente67082ecf9c89eeebbdf2c87b0a90e3edef2eabd (diff)
parentfe4945b2091d0bba8d86797e9c2acb62328dfb7e (diff)
Merge "Remove generated file in 'test_build_vm_xml'"
Diffstat (limited to 'tests/unit/benchmark/contexts')
-rw-r--r--tests/unit/benchmark/contexts/standalone/test_model.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/benchmark/contexts/standalone/test_model.py b/tests/unit/benchmark/contexts/standalone/test_model.py
index 021c18860..6090356b6 100644
--- a/tests/unit/benchmark/contexts/standalone/test_model.py
+++ b/tests/unit/benchmark/contexts/standalone/test_model.py
@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Unittest for yardstick.benchmark.contexts.standalone.model
-
import copy
import os
import unittest
@@ -182,6 +180,8 @@ class ModelLibvirtTestCase(unittest.TestCase):
*args):
# NOTE(ralonsoh): this test doesn't cover function execution. This test
# should also check mocked function calls.
+ cfg_file = 'test_config_file.cfg'
+ self.addCleanup(os.remove, cfg_file)
result = [4]
with mock.patch("yardstick.ssh.SSH") as ssh:
ssh_mock = mock.Mock(autospec=ssh.SSH)
@@ -190,7 +190,7 @@ class ModelLibvirtTestCase(unittest.TestCase):
ssh.return_value = ssh_mock
mock_create_snapshot_qemu.return_value = "0.img"
- status = model.Libvirt.build_vm_xml(ssh_mock, {}, "test", "vm_0", 0)
+ status = model.Libvirt.build_vm_xml(ssh_mock, {}, cfg_file, 'vm_0', 0)
self.assertEqual(status[0], result[0])
def test_update_interrupts_hugepages_perf(self):