New mock release(1.1.0) broke unit tests
Change-Id: I8ef86383ecb5f76fe44da4c424b2ba7e7a88aed5 Closes-Bug: #1473448
This commit is contained in:
parent
6c4d183f6e
commit
be2c0eb101
|
@ -47,7 +47,7 @@ class TestHooks(testtools.TestCase):
|
|||
return_value=['bp', 'another_bp'])
|
||||
|
||||
shell.do_stack_create(self.client, self.args)
|
||||
self.client.stacks.create.assert_called_once()
|
||||
self.assertEqual(1, self.client.stacks.create.call_count)
|
||||
expected_hooks = {
|
||||
'bp': {'hooks': 'pre-create'},
|
||||
'another_bp': {'hooks': 'pre-create'}
|
||||
|
@ -61,7 +61,7 @@ class TestHooks(testtools.TestCase):
|
|||
return_value=['nested/bp', 'super/nested/bp'])
|
||||
|
||||
shell.do_stack_create(self.client, self.args)
|
||||
self.client.stacks.create.assert_called_once()
|
||||
self.assertEqual(1, self.client.stacks.create.call_count)
|
||||
expected_hooks = {
|
||||
'nested': {
|
||||
'bp': {'hooks': 'pre-create'},
|
||||
|
@ -103,7 +103,7 @@ class TestHooks(testtools.TestCase):
|
|||
mock.Mock(return_value=({}, env))
|
||||
|
||||
shell.do_stack_create(self.client, self.args)
|
||||
self.client.stacks.create.assert_called_once()
|
||||
self.assertEqual(1, self.client.stacks.create.call_count)
|
||||
actual_hooks = self.client.stacks.create.call_args[1][
|
||||
'environment']['resource_registry']['resources']
|
||||
expected_hooks = {
|
||||
|
@ -135,7 +135,7 @@ class TestHooks(testtools.TestCase):
|
|||
return_value=['bp', 'another_bp'])
|
||||
|
||||
shell.do_stack_update(self.client, self.args)
|
||||
self.client.stacks.update.assert_called_once()
|
||||
self.assertEqual(1, self.client.stacks.update.call_count)
|
||||
expected_hooks = {
|
||||
'bp': {'hooks': 'pre-update'},
|
||||
'another_bp': {'hooks': 'pre-update'},
|
||||
|
@ -149,7 +149,7 @@ class TestHooks(testtools.TestCase):
|
|||
return_value=['nested/bp', 'super/nested/bp'])
|
||||
|
||||
shell.do_stack_update(self.client, self.args)
|
||||
self.client.stacks.update.assert_called_once()
|
||||
self.assertEqual(1, self.client.stacks.update.call_count)
|
||||
expected_hooks = {
|
||||
'nested': {
|
||||
'bp': {'hooks': 'pre-update'}
|
||||
|
@ -191,7 +191,7 @@ class TestHooks(testtools.TestCase):
|
|||
mock.Mock(return_value=({}, env))
|
||||
|
||||
shell.do_stack_update(self.client, self.args)
|
||||
self.client.stacks.update.assert_called_once()
|
||||
self.assertEqual(1, self.client.stacks.update.call_count)
|
||||
actual_hooks = self.client.stacks.update.call_args[1][
|
||||
'environment']['resource_registry']['resources']
|
||||
expected_hooks = {
|
||||
|
|
|
@ -8,7 +8,8 @@ coverage>=3.6
|
|||
discover
|
||||
fixtures>=1.3.1
|
||||
requests-mock>=0.6.0 # Apache-2.0
|
||||
mock>=1.0
|
||||
mock>=1.1;python_version!='2.6'
|
||||
mock==1.0.1;python_version=='2.6'
|
||||
mox3>=0.7.0
|
||||
oslosphinx>=2.5.0 # Apache-2.0
|
||||
oslotest>=1.5.1 # Apache-2.0
|
||||
|
|
Loading…
Reference in New Issue