Browse Source

Remove redundant FunctionalTest class

There are two definitions of FunctionalTest. So, we should remove
the redundant one.

Change-Id: I46cff8c437d3e17a10bf13a118bf6f6bc5fef878
Closes-Bug: 1476956
changes/68/204468/1
Hua Wang 7 years ago
parent
commit
c9032a47ff
  1. 42
      magnum/tests/__init__.py
  2. 3
      magnum/tests/unit/api/controllers/test_root.py

42
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)

3
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':

Loading…
Cancel
Save