From c9032a47ff3f3e749fcee8e69817a3150f85ff2d Mon Sep 17 00:00:00 2001 From: Hua Wang Date: Wed, 15 Jul 2015 03:39:11 +0800 Subject: [PATCH] Remove redundant FunctionalTest class There are two definitions of FunctionalTest. So, we should remove the redundant one. Change-Id: I46cff8c437d3e17a10bf13a118bf6f6bc5fef878 Closes-Bug: 1476956 --- magnum/tests/__init__.py | 42 ------------------- .../tests/unit/api/controllers/test_root.py | 3 +- 2 files changed, 1 insertion(+), 44 deletions(-) diff --git a/magnum/tests/__init__.py b/magnum/tests/__init__.py index d39e171312..e69de29bb2 100644 --- a/magnum/tests/__init__.py +++ b/magnum/tests/__init__.py @@ -1,42 +0,0 @@ -# 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. - -import os -import unittest - -from oslo_config import cfg -import pecan -from pecan import testing - - -cfg.CONF.import_opt('enable_authentication', 'magnum.api.auth') - - -__all__ = ['FunctionalTest'] - - -class FunctionalTest(unittest.TestCase): - """Functional tests - - Used for functional tests where you need to test your - literal application and its integration with the framework. - """ - - def setUp(self): - cfg.CONF.set_override("enable_authentication", False) - self.app = testing.load_test_app(os.path.join( - os.path.dirname(__file__), - 'config.py' - )) - - def tearDown(self): - pecan.set_config({}, overwrite=True) diff --git a/magnum/tests/unit/api/controllers/test_root.py b/magnum/tests/unit/api/controllers/test_root.py index 623084b1e0..ac3b6c7e7a 100644 --- a/magnum/tests/unit/api/controllers/test_root.py +++ b/magnum/tests/unit/api/controllers/test_root.py @@ -14,12 +14,11 @@ import mock from webob import exc as webob_exc from magnum.api.controllers import v1 as v1_api -from magnum import tests from magnum.tests import base as test_base from magnum.tests.unit.api import base as api_base -class TestRootController(tests.FunctionalTest): +class TestRootController(api_base.FunctionalTest): def test_version(self): expected = {u'default_version': {u'id': u'v1', u'links':