Merge "Start using oslotest for tempest unit tests"

This commit is contained in:
Jenkins 2014-05-30 14:31:09 +00:00 committed by Gerrit Code Review
commit e59275a21a
5 changed files with 10 additions and 20 deletions

View File

@ -12,28 +12,16 @@
# License for the specific language governing permissions and limitations
# under the License.
import os
import fixtures
import mock
import testtools
from tempest.openstack.common.fixture import moxstubout
from oslotest import base
from oslotest import moxstubout
class TestCase(testtools.TestCase):
class TestCase(base.BaseTestCase):
def setUp(self):
super(TestCase, self).setUp()
if (os.environ.get('OS_STDOUT_CAPTURE') == 'True' or
os.environ.get('OS_STDOUT_CAPTURE') == '1'):
stdout = self.useFixture(fixtures.StringStream('stdout')).stream
self.useFixture(fixtures.MonkeyPatch('sys.stdout', stdout))
if (os.environ.get('OS_STDERR_CAPTURE') == 'True' or
os.environ.get('OS_STDERR_CAPTURE') == '1'):
stderr = self.useFixture(fixtures.StringStream('stderr')).stream
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
mox_fixture = self.useFixture(moxstubout.MoxStubout())
self.mox = mox_fixture.mox
self.stubs = mox_fixture.stubs

View File

@ -16,11 +16,12 @@
import copy
import datetime
from oslotest import mockpatch
from tempest import auth
from tempest.common import http
from tempest import config
from tempest import exceptions
from tempest.openstack.common.fixture import mockpatch
from tempest.tests import base
from tempest.tests import fake_auth_provider
from tempest.tests import fake_config

View File

@ -14,13 +14,12 @@
import mock
import testtools
from oslo.config import cfg
from oslotest import mockpatch
import testtools
from tempest import config
from tempest import exceptions
from tempest.openstack.common.fixture import mockpatch
from tempest import test
from tempest.tests import base
from tempest.tests import fake_config

View File

@ -15,11 +15,12 @@
import httplib2
import json
from oslotest import mockpatch
from tempest.common import rest_client
from tempest.common import xml_utils as xml
from tempest import config
from tempest import exceptions
from tempest.openstack.common.fixture import mockpatch
from tempest.tests import base
from tempest.tests import fake_auth_provider
from tempest.tests import fake_config

View File

@ -7,3 +7,4 @@ oslosphinx
mox>=0.5.3
mock>=1.0
coverage>=3.6
oslotest