Remove 'oslotest.moxstubout' module
This has been deprecated for some time and codesearch.o.o suggests there are only three or so 'openstack/xxx' projects still using this, all of which should drop the usage shortly. Time to drop this module. Change-Id: I315254ede8353a0cd88828f520c596b1f02a56a7 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
dc7322e3c1
commit
94f102e75f
|
@ -17,7 +17,6 @@ linecache2==1.0.0
|
|||
MarkupSafe==1.0
|
||||
mccabe==0.2.1
|
||||
mock==2.0.0
|
||||
mox3==0.20.0
|
||||
netaddr==0.7.18
|
||||
openstackdocstheme==1.18.1
|
||||
os-client-config==1.28.0
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
# Copyright 2010 United States Government as represented by the
|
||||
# Administrator of the National Aeronautics and Space Administration.
|
||||
# Copyright 2013 Hewlett-Packard Development Company, L.P.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from debtcollector import removals
|
||||
import fixtures
|
||||
from mox3 import mox
|
||||
|
||||
|
||||
@removals.removed_class('MoxStubout', version='3.5.0')
|
||||
class MoxStubout(fixtures.Fixture):
|
||||
"""Deal with code around mox and stubout as a fixture."""
|
||||
|
||||
def setUp(self):
|
||||
super(MoxStubout, self).setUp()
|
||||
# emulate some of the mox stuff, we can't use the metaclass
|
||||
# because it screws with our generators
|
||||
self.mox = mox.Mox()
|
||||
self.stubs = self.mox.stubs
|
||||
self.addCleanup(self.mox.UnsetStubs)
|
||||
self.addCleanup(self.mox.VerifyAll)
|
|
@ -1,33 +0,0 @@
|
|||
# Copyright 2014 IBM Corp.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslotest import base
|
||||
from oslotest import moxstubout
|
||||
|
||||
|
||||
class TestMoxStubout(base.BaseTestCase):
|
||||
|
||||
def _stubable(self):
|
||||
pass
|
||||
|
||||
def test_basic_stubout(self):
|
||||
f = self.useFixture(moxstubout.MoxStubout())
|
||||
before = TestMoxStubout._stubable
|
||||
f.mox.StubOutWithMock(TestMoxStubout, '_stubable')
|
||||
after = TestMoxStubout._stubable
|
||||
self.assertNotEqual(before, after)
|
||||
f.cleanUp()
|
||||
after2 = TestMoxStubout._stubable
|
||||
self.assertEqual(before, after2)
|
||||
f._clear_cleanups()
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
The ``oslotest.moxstubout`` module, which was deprecated in 3.5.0, has now
|
||||
been removed. Mox is considered unmaintained and should be replaced by
|
||||
mock.
|
|
@ -7,6 +7,5 @@ python-subunit>=1.0.0 # Apache-2.0/BSD
|
|||
six>=1.10.0 # MIT
|
||||
testtools>=2.2.0 # MIT
|
||||
mock>=2.0.0 # BSD
|
||||
mox3>=0.20.0 # Apache-2.0
|
||||
os-client-config>=1.28.0 # Apache-2.0
|
||||
debtcollector>=1.2.0 # Apache-2.0
|
||||
|
|
Loading…
Reference in New Issue