test_upgrade_common: add mock for get_package_version
@@ -122,13 +122,15 @@ class TestInstall(object):
for t in assert_ok_vals:
assert install._upgrade_is_downgrade(t[0], t[1]) == False
+ @patch("teuthology.packaging.get_package_version")
@patch("teuthology.misc.get_system_type")
@patch("teuthology.task.install.verify_package_version")
@patch("teuthology.task.install.get_upgrade_version")
def test_upgrade_common(self,
m_get_upgrade_version,
m_verify_package_version,
- m_get_system_type):
+ m_get_system_type,
+ m_get_package_version):
expected_system_type = 'deb'
def make_remote():
remote = Mock()
@@ -169,6 +171,7 @@ class TestInstall(object):
],
}
m_get_upgrade_version.return_value = "11.0.0"
+ m_get_package_version.return_value = "10.2.4"
m_get_system_type.return_value = "deb"
def upgrade(ctx, node, remote, pkgs, system_type):
assert system_type == expected_system_type
