From 9374a080e1ccc63d392a2eaffd6a2a1b291c0c58 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Thu, 30 Apr 2015 17:24:02 -0700 Subject: [PATCH] Make test_version_string_with_package_is_good work with pbr 0.11 nova.version uses the version_string() API not version. Fix the test to reflect that and make it work with pbr 0.11 Closes-Bug: #1450682 Change-Id: I4887b8000c9943c91f8add56fcc54fa18e78d683 --- nova/tests/unit/test_versions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/tests/unit/test_versions.py b/nova/tests/unit/test_versions.py index 7dfbd4928d6f..8694eac77a47 100644 --- a/nova/tests/unit/test_versions.py +++ b/nova/tests/unit/test_versions.py @@ -27,7 +27,8 @@ class VersionTestCase(test.NoDBTestCase): def test_version_string_with_package_is_good(self): """Ensure uninstalled code get version string.""" - self.stubs.Set(version.version_info, 'version', '5.5.5.5') + self.stubs.Set(version.version_info, 'version_string', + lambda: '5.5.5.5') self.stubs.Set(version, 'NOVA_PACKAGE', 'g9ec3421') self.assertEqual("5.5.5.5-g9ec3421", version.version_string_with_package())