Merge "Fix test_barbican_legacy for Python 3.8"

This commit is contained in:
Zuul 2020-06-09 12:18:23 +00:00 committed by Gerrit Code Review
commit be2acaeb36
1 changed files with 13 additions and 12 deletions

View File

@ -238,8 +238,9 @@ class TestBarbicanManager(base.TestCase):
def test_get_cert_no_registration_raise_on_secret_access_failure(self):
self.bc.containers.get.return_value = self.container
type(self.certificate).payload = mock.PropertyMock(
side_effect=ValueError)
with mock.patch('barbicanclient.v1.secrets.Secret.payload',
new_callable=mock.PropertyMock) as mock_payload:
mock_payload.side_effect = ValueError
# Get the container data
self.assertRaises(