From 0ac09a58da5994448f16ed6a4eb488886351a7c1 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Thu, 2 Feb 2017 13:37:07 -0500 Subject: [PATCH] add mocks to fix validation tests Something changed in one of the git repos used by the unit tests, so mock out the call that is now failing to restore the original behavior. Change-Id: I0bb7ab969f077640fab4443fa4b4db0b5fd91ae3 Signed-off-by: Doug Hellmann --- openstack_releases/tests/test_validate.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openstack_releases/tests/test_validate.py b/openstack_releases/tests/test_validate.py index ffeaa74edb..c88217a89e 100644 --- a/openstack_releases/tests/test_validate.py +++ b/openstack_releases/tests/test_validate.py @@ -630,11 +630,13 @@ class TestPuppetUtils(base.BaseTestCase): super(TestPuppetUtils, self).setUp() self.tmpdir = self.useFixture(fixtures.TempDir()).path + @mock.patch('openstack_releases.gitutils.check_branch_sha') @mock.patch('openstack_releases.puppetutils.get_version') @mock.patch('openstack_releases.puppetutils.looks_like_a_module') - def test_valid_version(self, llam, get_version): + def test_valid_version(self, llam, get_version, cbs): llam.return_value = True get_version.return_value = '99.1.0' + cbs.return_value = True deliverable_info = { 'artifact-link-mode': 'none', 'releases': [ @@ -659,11 +661,13 @@ class TestPuppetUtils(base.BaseTestCase): self.assertEqual(0, len(warnings)) self.assertEqual(0, len(errors)) + @mock.patch('openstack_releases.gitutils.check_branch_sha') @mock.patch('openstack_releases.puppetutils.get_version') @mock.patch('openstack_releases.puppetutils.looks_like_a_module') - def test_mismatched_version(self, llam, get_version): + def test_mismatched_version(self, llam, get_version, cbs): llam.return_value = True get_version.return_value = '99.1.0' + cbs.return_value = True deliverable_info = { 'artifact-link-mode': 'none', 'releases': [