Create v3 tests directory
Create a basic framework that inherits from v1_1 and can be overridden as necessary in extension commits bp v3-api Change-Id: I611451e50a9e553a18777fa48f32e368b919605e
This commit is contained in:
parent
4e8caf8ed6
commit
615ad3de54
0
novaclient/tests/v3/__init__.py
Normal file
0
novaclient/tests/v3/__init__.py
Normal file
32
novaclient/tests/v3/fakes.py
Normal file
32
novaclient/tests/v3/fakes.py
Normal file
@ -0,0 +1,32 @@
|
||||
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
|
||||
# Copyright 2011 OpenStack Foundation
|
||||
# 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 novaclient.v3 import client
|
||||
from novaclient.tests import fakes
|
||||
from novaclient.tests.v1_1 import fakes as fakes_v1_1
|
||||
|
||||
|
||||
class FakeClient(fakes.FakeClient, client.Client):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
client.Client.__init__(self, 'username', 'password',
|
||||
'project_id', 'auth_url',
|
||||
extensions=kwargs.get('extensions'))
|
||||
self.client = FakeHTTPClient(**kwargs)
|
||||
|
||||
|
||||
class FakeHTTPClient(fakes_v1_1.FakeHTTPClient):
|
||||
pass
|
Loading…
Reference in New Issue
Block a user