summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2020-02-25 17:08:51 +0000
committerStephen Finucane <stephenfin@redhat.com>2020-02-25 17:12:16 +0000
commit94f102e75ff402b833f35722b9bcd097d8992eaa (patch)
tree9233628da1fe8a186324060a59eae555e7528dad
parentdc7322e3c1b5e6162148cb9fe468c28bc82edce0 (diff)
downloadoslotest-94f102e75ff402b833f35722b9bcd097d8992eaa.tar.gz
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>
-rw-r--r--lower-constraints.txt1
-rw-r--r--oslotest/moxstubout.py34
-rw-r--r--oslotest/tests/unit/test_moxstubout.py33
-rw-r--r--releasenotes/notes/remove-moxstubout-63345dd5d9528e83.yaml6
-rw-r--r--requirements.txt1
5 files changed, 6 insertions, 69 deletions
diff --git a/lower-constraints.txt b/lower-constraints.txt
index cbe48b7..1822645 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -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
diff --git a/oslotest/moxstubout.py b/oslotest/moxstubout.py
deleted file mode 100644
index 00436fd..0000000
--- a/oslotest/moxstubout.py
+++ /dev/null
@@ -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)
diff --git a/oslotest/tests/unit/test_moxstubout.py b/oslotest/tests/unit/test_moxstubout.py
deleted file mode 100644
index 8a12705..0000000
--- a/oslotest/tests/unit/test_moxstubout.py
+++ /dev/null
@@ -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()
diff --git a/releasenotes/notes/remove-moxstubout-63345dd5d9528e83.yaml b/releasenotes/notes/remove-moxstubout-63345dd5d9528e83.yaml
new file mode 100644
index 0000000..0c9cd6e
--- /dev/null
+++ b/releasenotes/notes/remove-moxstubout-63345dd5d9528e83.yaml
@@ -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.
diff --git a/requirements.txt b/requirements.txt
index efa5dac..b14af44 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -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