Merge "add mocks to fix validation tests"
This commit is contained in:
commit
a83bdbb4cc
@ -660,11 +660,13 @@ class TestPuppetUtils(base.BaseTestCase):
|
|||||||
super(TestPuppetUtils, self).setUp()
|
super(TestPuppetUtils, self).setUp()
|
||||||
self.tmpdir = self.useFixture(fixtures.TempDir()).path
|
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.get_version')
|
||||||
@mock.patch('openstack_releases.puppetutils.looks_like_a_module')
|
@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
|
llam.return_value = True
|
||||||
get_version.return_value = '99.1.0'
|
get_version.return_value = '99.1.0'
|
||||||
|
cbs.return_value = True
|
||||||
deliverable_info = {
|
deliverable_info = {
|
||||||
'artifact-link-mode': 'none',
|
'artifact-link-mode': 'none',
|
||||||
'releases': [
|
'releases': [
|
||||||
@ -689,11 +691,13 @@ class TestPuppetUtils(base.BaseTestCase):
|
|||||||
self.assertEqual(0, len(warnings))
|
self.assertEqual(0, len(warnings))
|
||||||
self.assertEqual(0, len(errors))
|
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.get_version')
|
||||||
@mock.patch('openstack_releases.puppetutils.looks_like_a_module')
|
@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
|
llam.return_value = True
|
||||||
get_version.return_value = '99.1.0'
|
get_version.return_value = '99.1.0'
|
||||||
|
cbs.return_value = True
|
||||||
deliverable_info = {
|
deliverable_info = {
|
||||||
'artifact-link-mode': 'none',
|
'artifact-link-mode': 'none',
|
||||||
'releases': [
|
'releases': [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user