Remove moxstubout usage

As of version 3.5.0 moxstub will be deprecated,
so remove it where it has been used.

Change-Id: Ic98f3035fd9dff165259e3d194ab5eea11469169
Signed-off-by: Chuck Short <chucks@redhat.com>
This commit is contained in:
Chuck Short 2018-08-21 23:41:58 -04:00
parent 67169dc23a
commit dc2ba62297
1 changed files with 2 additions and 5 deletions

View File

@ -13,11 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
import uuid
import fixtures
import mock
from oslotest import base as test_base
from oslotest import moxstubout
from oslo_middleware import correlation_id
@ -26,7 +24,6 @@ class CorrelationIdTest(test_base.BaseTestCase):
def setUp(self):
super(CorrelationIdTest, self).setUp()
self.stubs = self.useFixture(moxstubout.MoxStubout()).stubs
def test_process_request(self):
app = mock.Mock()
@ -35,7 +32,7 @@ class CorrelationIdTest(test_base.BaseTestCase):
mock_uuid4 = mock.Mock()
mock_uuid4.return_value = "fake_uuid"
self.stubs.Set(uuid, 'uuid4', mock_uuid4)
self.useFixture(fixtures.MockPatch('uuid.uuid4', mock_uuid4))
middleware = correlation_id.CorrelationId(app)
middleware(req)