diff --git a/nova/tests/unit/matchers.py b/nova/tests/unit/matchers.py index a8842a9708..6db091178a 100644 --- a/nova/tests/unit/matchers.py +++ b/nova/tests/unit/matchers.py @@ -225,7 +225,7 @@ class XMLMismatch(object): self.actual = state.actual def describe(self): - return "%(path)s: XML does not match" % self.path + return "%(path)s: XML does not match" % {'path': self.path} def get_details(self): return { diff --git a/nova/tests/unit/virt/libvirt/test_driver.py b/nova/tests/unit/virt/libvirt/test_driver.py index f37aa110e1..dc0a4a4400 100644 --- a/nova/tests/unit/virt/libvirt/test_driver.py +++ b/nova/tests/unit/virt/libvirt/test_driver.py @@ -9931,7 +9931,7 @@ Active: 8381604 kB elif method_name == "detach_interface": fake_image_meta = None else: - raise ValueError("Unhandled method %" % method_name) + raise ValueError("Unhandled method %s" % method_name) if method_name == "attach_interface": self.mox.StubOutWithMock(conn.firewall_driver, @@ -9957,7 +9957,7 @@ Active: 8381604 kB elif method_name == "detach_interface": conn.detach_interface(instance, network_info[0]) else: - raise ValueError("Unhandled method %" % method_name) + raise ValueError("Unhandled method %s" % method_name) @mock.patch.object(lockutils, "external_lock") def test_attach_interface_get_config(self, mock_lock):