Merge "User APIRouterV21 instead of APIRouterV3 for v2.1 unittests"
This commit is contained in:
commit
9b5fb399d6
|
@ -46,11 +46,11 @@ class SchedulerHintsTestCaseV21(test.TestCase):
|
|||
self._set_up_router()
|
||||
|
||||
def _set_up_router(self):
|
||||
self.app = compute.APIRouterV3(init_only=('servers',
|
||||
'os-scheduler-hints'))
|
||||
self.app = compute.APIRouterV21(init_only=('servers',
|
||||
'os-scheduler-hints'))
|
||||
|
||||
def _get_request(self):
|
||||
return fakes.HTTPRequest.blank('/servers')
|
||||
return fakes.HTTPRequest.blank('/fake/servers')
|
||||
|
||||
def test_create_server_without_hints(self):
|
||||
|
||||
|
|
|
@ -3479,7 +3479,7 @@ class ServersAllExtensionsTestCase(test.TestCase):
|
|||
|
||||
def setUp(self):
|
||||
super(ServersAllExtensionsTestCase, self).setUp()
|
||||
self.app = compute.APIRouterV3()
|
||||
self.app = compute.APIRouterV21()
|
||||
|
||||
def test_create_missing_server(self):
|
||||
# Test create with malformed body.
|
||||
|
@ -3489,7 +3489,7 @@ class ServersAllExtensionsTestCase(test.TestCase):
|
|||
|
||||
self.stubs.Set(compute_api.API, 'create', fake_create)
|
||||
|
||||
req = fakes.HTTPRequestV21.blank('/servers')
|
||||
req = fakes.HTTPRequestV21.blank('/fake/servers')
|
||||
req.method = 'POST'
|
||||
req.content_type = 'application/json'
|
||||
body = {'foo': {'a': 'b'}}
|
||||
|
@ -3501,7 +3501,7 @@ class ServersAllExtensionsTestCase(test.TestCase):
|
|||
def test_update_missing_server(self):
|
||||
# Test update with malformed body.
|
||||
|
||||
req = fakes.HTTPRequestV21.blank('/servers/1')
|
||||
req = fakes.HTTPRequestV21.blank('/fake/servers/1')
|
||||
req.method = 'PUT'
|
||||
req.content_type = 'application/json'
|
||||
body = {'foo': {'a': 'b'}}
|
||||
|
|
Loading…
Reference in New Issue