Remove remaining use of mox
This is pretty trivial but kills mox usage in this project. Change-Id: I905b03116d7d7e856581532fda104fe08c4e9f35 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
09738a8ab9
commit
afcc817945
|
@ -13,9 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import gettext
|
||||
|
||||
from babel import localedata
|
||||
import fixtures
|
||||
import mock
|
||||
import webob
|
||||
|
||||
|
@ -34,7 +32,9 @@ class RequestTest(test_utils.BaseTestCase):
|
|||
def returns_some_locales(*args, **kwargs):
|
||||
return all_locales
|
||||
|
||||
self.stubs.Set(localedata, 'locale_identifiers', returns_some_locales)
|
||||
self.useFixture(fixtures.MonkeyPatch(
|
||||
'babel.localedata.local_identifiers', returns_some_locales
|
||||
))
|
||||
|
||||
# Override gettext.find to return other than None for some languages.
|
||||
def fake_gettext_find(lang_id, *args, **kwargs):
|
||||
|
@ -47,7 +47,9 @@ class RequestTest(test_utils.BaseTestCase):
|
|||
return found_ret
|
||||
return None
|
||||
|
||||
self.stubs.Set(gettext, 'find', fake_gettext_find)
|
||||
self.useFixture(fixtures.MonkeyPatch(
|
||||
'gettext.find', fake_gettext_find
|
||||
))
|
||||
|
||||
def test_language_accept_default(self):
|
||||
request = wsgi.Request.blank('/tests/123')
|
||||
|
|
|
@ -27,7 +27,6 @@ import subprocess
|
|||
import fixtures
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslotest import moxstubout
|
||||
import six
|
||||
from six.moves import BaseHTTPServer
|
||||
import testtools
|
||||
|
@ -53,8 +52,6 @@ class BaseTestCase(testtools.TestCase):
|
|||
# the following policy tests
|
||||
config.parse_args(args=[], default_config_files=[])
|
||||
self.addCleanup(CONF.reset)
|
||||
mox_fixture = self.useFixture(moxstubout.MoxStubout())
|
||||
self.stubs = mox_fixture.stubs
|
||||
|
||||
self.mock_exception = mock.patch(
|
||||
'searchlight.common.exception',
|
||||
|
|
Loading…
Reference in New Issue