From 5ee26a20359a8aa4095ec5c102052efb976912fb Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Mon, 20 Apr 2020 10:54:22 -0700 Subject: [PATCH] Fix Octavia unit tests for python 3.8 The python 3.8 unit test jobs are failing on a mock.Mock(spec=secrets.Secret) call. Since this is legacy code and we don't really need to be testing python-barbicanclient code here, I'm removing the spec= for these tests to stop artificial failures when running unit tests on python 3.8. Change-Id: I9132e2d05bf67ddff4f2d7879d799c8dd25bd3c7 --- .../unit/certificates/manager/test_barbican_legacy.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/octavia/tests/unit/certificates/manager/test_barbican_legacy.py b/octavia/tests/unit/certificates/manager/test_barbican_legacy.py index 6e9633f2d6..aa7358ba34 100644 --- a/octavia/tests/unit/certificates/manager/test_barbican_legacy.py +++ b/octavia/tests/unit/certificates/manager/test_barbican_legacy.py @@ -78,10 +78,10 @@ class TestBarbicanManager(base.TestCase): self.empty_container = mock.Mock(spec=containers.CertificateContainer) - self.secret1 = mock.Mock(spec=secrets.Secret) - self.secret2 = mock.Mock(spec=secrets.Secret) - self.secret3 = mock.Mock(spec=secrets.Secret) - self.secret4 = mock.Mock(spec=secrets.Secret) + self.secret1 = mock.Mock() + self.secret2 = mock.Mock() + self.secret3 = mock.Mock() + self.secret4 = mock.Mock() # Mock out the client self.bc = mock.Mock()