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:
Ben Nemec 2013-08-15 17:31:37 -05:00
parent 4e8caf8ed6
commit 615ad3de54
2 changed files with 32 additions and 0 deletions

View File

View 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