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
This commit is contained in:
Joe Gordon 2015-04-30 17:24:02 -07:00
parent b9ae85e7d3
commit e896c5a3d3
1 changed files with 2 additions and 1 deletions

View File

@ -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())