From 69afdcdb88f6fe6c9b57e350ed8c8cb832e283b4 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Wed, 28 Oct 2015 21:32:29 -0500 Subject: [PATCH] Add missing ddt class decorator Two classes were missing the @ddt.ddt class decorator. Add it, and fix tests where necessary. Change-Id: I6d692a688b5d97518d7cda1736cf09f628e9cd96 --- tests/unit/plugins/openstack/scenarios/swift/test_utils.py | 1 + tests/unit/test_osclients.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unit/plugins/openstack/scenarios/swift/test_utils.py b/tests/unit/plugins/openstack/scenarios/swift/test_utils.py index 3f71e163ac..500ddab508 100644 --- a/tests/unit/plugins/openstack/scenarios/swift/test_utils.py +++ b/tests/unit/plugins/openstack/scenarios/swift/test_utils.py @@ -22,6 +22,7 @@ from tests.unit import test SWIFT_UTILS = "rally.plugins.openstack.scenarios.swift.utils" +@ddt.ddt class SwiftScenarioTestCase(test.ScenarioTestCase): def test__list_containers(self): diff --git a/tests/unit/test_osclients.py b/tests/unit/test_osclients.py index 60e1be87d3..dbd26cff0c 100644 --- a/tests/unit/test_osclients.py +++ b/tests/unit/test_osclients.py @@ -127,6 +127,7 @@ class TestCreateKeystoneClient(test.TestCase): mock_discover.version_data.assert_called_once_with() +@ddt.ddt class OSClientsTestCase(test.TestCase): def setUp(self): @@ -647,7 +648,10 @@ class OSClientsTestCase(test.TestCase): self.assertNotIn("designate", self.clients.cache) with mock.patch.dict("sys.modules", {"designateclient": mock_designate}): - client = self.clients.designate() + if version is not None: + client = self.clients.designate(version=version) + else: + client = self.clients.designate() self.assertEqual(fake_designate, client) self.service_catalog.url_for.assert_called_once_with( service_type="dns",