16f73c8a43
This moves the integrated tests into the functional tree as an initial seed for the functional tests. It was agreed to as an early step at the design summit. Work on cleaning these up will happen after the move. PYTHON_HASH_SEED=0 is needed because these tests apparently remain order dependent. Also remove the use of test.ReplaceModule, which is an untested mocking system in the nova tree that doesn't seem to reliably work. Use stubs instead for the time being, as this will ensure repeatability of the code. Part of bp:functional-tests-for-nova Change-Id: I742c487dd7bca9de3e811c545de477367fff112c
35 lines
1.3 KiB
Python
35 lines
1.3 KiB
Python
# Copyright 2012 Nebula, Inc.
|
|
# Copyright 2013 IBM Corp.
|
|
#
|
|
# 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.
|
|
|
|
from nova.tests.functional.v3 import test_servers
|
|
|
|
|
|
class ExtendedAvailabilityZoneJsonTests(test_servers.ServersSampleBase):
|
|
extension_name = "os-extended-availability-zone"
|
|
|
|
def test_show(self):
|
|
uuid = self._post_server()
|
|
response = self._do_get('servers/%s' % uuid)
|
|
subs = self._get_regexes()
|
|
subs['hostid'] = '[a-f0-9]+'
|
|
self._verify_response('server-get-resp', subs, response, 200)
|
|
|
|
def test_detail(self):
|
|
self._post_server()
|
|
response = self._do_get('servers/detail')
|
|
subs = self._get_regexes()
|
|
subs['hostid'] = '[a-f0-9]+'
|
|
self._verify_response('servers-detail-resp', subs, response, 200)
|