Merge "Increased UT of magnum/api/app.py"

This commit is contained in:
Jenkins 2016-08-15 04:50:21 +00:00 committed by Gerrit Code Review
commit 4b66daafd7
1 changed files with 6 additions and 0 deletions

View File

@ -95,6 +95,12 @@ class TestRootController(api_base.FunctionalTest):
ff.return_value = None
self.assertRaises(cfg.ConfigFilesNotFoundError, app.load_app)
@mock.patch('magnum.api.app.deploy')
def test_api_paste_file_not_exist_not_abs(self, mock_deploy):
path = self.get_path(cfg.CONF['api']['api_paste_config'] + 'test')
cfg.CONF.set_override('api_paste_config', path, group='api')
self.assertRaises(cfg.ConfigFilesNotFoundError, app.load_app)
def test_noauth(self):
# Don't need to auth
paste_file = "magnum/tests/unit/api/controllers/noauth-paste.ini"