Move disabling of logging to the test base file

By this change we will not have to disable logging in each test
file which exercises a code which logs something.

Change-Id: I2ec572b425bf0100dbd4033bd1e2430964d9a7ca
This commit is contained in:
Martin Kopec 2019-04-09 13:27:05 +00:00
parent fa359b84c3
commit b7ea055eed
5 changed files with 4 additions and 16 deletions

View File

@ -17,6 +17,7 @@
from fixtures import MonkeyPatch
import json
import logging
import mock
from oslotest import base
@ -24,6 +25,9 @@ from config_tempest.clients import ClientManager
from config_tempest.credentials import Credentials
from config_tempest import tempest_conf
# disable logging when running unit tests
logging.disable(logging.CRITICAL)
class BaseConfigTempestTest(base.BaseTestCase):

View File

@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import logging
import mock
from config_tempest.services.boto import Ec2Service
@ -21,9 +20,6 @@ from config_tempest.services.boto import S3Service
from config_tempest.services.services import Services
from config_tempest.tests.base import BaseConfigTempestTest
# disable logging when running unit tests
logging.disable(logging.CRITICAL)
class TestEc2Service(BaseConfigTempestTest):

View File

@ -16,7 +16,6 @@
# under the License.
from fixtures import MonkeyPatch
import logging
import mock
from config_tempest.clients import ClientManager
@ -24,9 +23,6 @@ from config_tempest.clients import ProjectsClient
from config_tempest.tests.base import BaseConfigTempestTest
from tempest.lib import exceptions
# disable logging when running unit tests
logging.disable(logging.CRITICAL)
class TestProjectsClient(BaseConfigTempestTest):
LIST_PROJECTS = [{'name': 'my_name'}]

View File

@ -16,7 +16,6 @@
# under the License.
from fixtures import MonkeyPatch
import logging
import mock
from config_tempest.clients import ClientManager
@ -24,9 +23,6 @@ from config_tempest import main as tool
from config_tempest import tempest_conf
from config_tempest.tests.base import BaseConfigTempestTest
# disable logging when running unit tests
logging.disable(logging.CRITICAL)
class TestOsClientConfigSupport(BaseConfigTempestTest):

View File

@ -14,16 +14,12 @@
# under the License.
from fixtures import MonkeyPatch
import logging
import mock
from config_tempest import constants as C
from config_tempest.flavors import Flavors
from config_tempest.tests.base import BaseConfigTempestTest
# disable logging when running unit tests
logging.disable(logging.CRITICAL)
class TestFlavors(BaseConfigTempestTest):
"""Flavors test class