Fix unit tests failing gate
The newest release of pecan (0.9.0) has some changes that break several of refstack's unit tests. This patch adds an attribute to certain mock objects to fix the failures. Change-Id: I48cd06eb59260f01cf7a12428b1452675f95ddb8
This commit is contained in:
parent
490d5f1f08
commit
b4183747bd
@ -58,7 +58,7 @@ class ResultsControllerTestCase(base.BaseTestCase):
|
||||
super(ResultsControllerTestCase, self).setUp()
|
||||
self.validator = mock.Mock()
|
||||
v1.ResultsController.__validator__ = \
|
||||
mock.Mock(return_value=self.validator)
|
||||
mock.Mock(exposed=False, return_value=self.validator)
|
||||
self.controller = v1.ResultsController()
|
||||
self.config_fixture = config_fixture.Config()
|
||||
self.CONF = self.useFixture(self.config_fixture).conf
|
||||
@ -330,7 +330,7 @@ class BaseRestControllerWithValidationTestCase(base.BaseTestCase):
|
||||
super(BaseRestControllerWithValidationTestCase, self).setUp()
|
||||
self.validator = mock.Mock()
|
||||
v1.BaseRestControllerWithValidation.__validator__ = \
|
||||
mock.Mock(return_value=self.validator)
|
||||
mock.Mock(exposed=False, return_value=self.validator)
|
||||
self.controller = v1.BaseRestControllerWithValidation()
|
||||
|
||||
@mock.patch('pecan.response')
|
||||
|
Loading…
x
Reference in New Issue
Block a user