/
usr
/
lib
/
python2.6
/
site-packages
/
glanceclient
/
tests
/
unit
/
v2
/
/usr/lib/python2.6/site-packages/glanceclient/tests/unit/v2
mkdir
upload
Name
Size
Mode
Actions
fixtures.py
9271
0644
edit
dl
rm
fixtures.pyc
4725
0644
edit
dl
rm
test_client_requests.py
2590
0644
edit
dl
rm
test_client_requests.pyc
2297
0644
edit
dl
rm
test_images.py
40321
0644
edit
dl
rm
test_images.pyc
35670
0644
edit
dl
rm
test_members.py
3644
0644
edit
dl
rm
test_members.pyc
3230
0644
edit
dl
rm
test_metadefs_namespaces.py
25575
0644
edit
dl
rm
test_metadefs_namespaces.pyc
14563
0644
edit
dl
rm
test_metadefs_objects.py
12278
0644
edit
dl
rm
test_metadefs_objects.pyc
7458
0644
edit
dl
rm
test_metadefs_properties.py
10072
0644
edit
dl
rm
test_metadefs_properties.pyc
6557
0644
edit
dl
rm
test_metadefs_resource_types.py
7263
0644
edit
dl
rm
test_metadefs_resource_types.pyc
5037
0644
edit
dl
rm
test_metadefs_tags.py
5012
0644
edit
dl
rm
test_metadefs_tags.pyc
4795
0644
edit
dl
rm
test_schemas.py
7246
0644
edit
dl
rm
test_schemas.pyc
9121
0644
edit
dl
rm
test_shell_v2.py
56737
0644
edit
dl
rm
test_shell_v2.pyc
50225
0644
edit
dl
rm
test_tags.py
2381
0644
edit
dl
rm
test_tags.pyc
2274
0644
edit
dl
rm
test_tasks.py
11379
0644
edit
dl
rm
test_tasks.pyc
9700
0644
edit
dl
rm
test_versions.py
2414
0644
edit
dl
rm
test_versions.pyc
1817
0644
edit
dl
rm
__init__.py
0
0644
edit
dl
rm
__init__.pyc
167
0644
edit
dl
rm
Edit:
/usr/lib/python2.6/site-packages/glanceclient/tests/unit/v2/test_versions.py
(2414B)
# Copyright 2015 OpenStack Foundation # Copyright 2015 Huawei Corp. # All Rights Reserved. # # 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. import testtools from glanceclient.tests import utils from glanceclient.v2 import versions fixtures = { '/versions': { 'GET': ( {}, {"versions": [ { "status": "EXPERIMENTAL", "id": "v3.0", "links": [ { "href": "http://10.229.45.145:9292/v3/", "rel": "self" } ] }, { "status": "CURRENT", "id": "v2.3", "links": [ { "href": "http://10.229.45.145:9292/v2/", "rel": "self" } ] }, { "status": "SUPPORTED", "id": "v1.0", "links": [ { "href": "http://10.229.45.145:9292/v1/", "rel": "self" } ] } ]} ) } } class TestVersions(testtools.TestCase): def setUp(self): super(TestVersions, self).setUp() self.api = utils.FakeAPI(fixtures) self.controller = versions.VersionController(self.api) def test_version_list(self): version = list(self.controller.list()) self.assertEqual('v3.0', version[0]['id']) self.assertEqual('EXPERIMENTAL', version[0]['status']) self.assertEqual([{"href": "http://10.229.45.145:9292/v3/", "rel": "self"}], version[0]['links'])
Save
cmd:
run