diff options
| author | Cerberus <matt.dietz@rackspace.com> | 2010-08-25 16:37:22 -0500 |
|---|---|---|
| committer | Cerberus <matt.dietz@rackspace.com> | 2010-08-25 16:37:22 -0500 |
| commit | 8b58c7296ae394772dab82fbb76469722798cc29 (patch) | |
| tree | c4f1b227cbab0afd317149c45b0b9cdd2569a70c /nova | |
| parent | 686ad09fe4416bb578661a42f6f083528d4a7ca9 (diff) | |
Moved API tests into a sub-folder of the tests/ and added a stubbed-out test declarations to mirror existing API tickets
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/tests/api/__init__.py | 0 | ||||
| -rw-r--r-- | nova/tests/api/rackspace/__init__.py | 0 | ||||
| -rw-r--r-- | nova/tests/api/rackspace/flavors.py | 34 | ||||
| -rw-r--r-- | nova/tests/api/rackspace/images.py | 42 | ||||
| -rw-r--r-- | nova/tests/api/rackspace/servers.py | 55 | ||||
| -rw-r--r-- | nova/tests/api/rackspace/sharedipgroups.py | 40 | ||||
| -rw-r--r-- | nova/tests/api/test.py (renamed from nova/api/test.py) | 12 | ||||
| -rw-r--r-- | nova/tests/api/test_helper.py | 7 | ||||
| -rw-r--r-- | nova/tests/api/wsgi_test.py (renamed from nova/wsgi_test.py) | 0 |
9 files changed, 183 insertions, 7 deletions
diff --git a/nova/tests/api/__init__.py b/nova/tests/api/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/nova/tests/api/__init__.py diff --git a/nova/tests/api/rackspace/__init__.py b/nova/tests/api/rackspace/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/nova/tests/api/rackspace/__init__.py diff --git a/nova/tests/api/rackspace/flavors.py b/nova/tests/api/rackspace/flavors.py new file mode 100644 index 000000000..fb8ba94a5 --- /dev/null +++ b/nova/tests/api/rackspace/flavors.py @@ -0,0 +1,34 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 2010 OpenStack LLC. +# 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 unittest + +from nova.api.rackspace import flavors +from nova.tests.api.test_helper import * + +class FlavorsTest(unittest.TestCase): + def setUp(self): + self.stubs = stubout.StubOutForTesting() + + def tearDown(self): + self.stubs.UnsetAll() + + def test_get_flavor_list(self): + pass + + def test_get_flavor_by_id(self): + pass diff --git a/nova/tests/api/rackspace/images.py b/nova/tests/api/rackspace/images.py new file mode 100644 index 000000000..0e3a87051 --- /dev/null +++ b/nova/tests/api/rackspace/images.py @@ -0,0 +1,42 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 2010 OpenStack LLC. +# 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 unittest + +from nova.api.rackspace import images +from nova.tests.api.test_helper import * + +class ImagesTest(unittest.TestCase): + def setUp(self): + self.stubs = stubout.StubOutForTesting() + + def tearDown(self): + self.stubs.UnsetAll() + + def test_get_image_list(self): + pass + + def test_get_backup_schedule(self): + pass + + def test_delete_image(self): + pass + + def test_create_image(self): + pass + + diff --git a/nova/tests/api/rackspace/servers.py b/nova/tests/api/rackspace/servers.py new file mode 100644 index 000000000..980e69b84 --- /dev/null +++ b/nova/tests/api/rackspace/servers.py @@ -0,0 +1,55 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 2010 OpenStack LLC. +# 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 unittest + +from nova.api.rackspace import servers +from nova.tests.api.test_helper import * + +class ServersTest(unittest.TestCase): + def setUp(self): + self.stubs = stubout.StubOutForTesting() + + def tearDown(self): + self.stubs.UnsetAll() + + def test_get_server_list(self): + pass + + def test_create_instance(self): + pass + + def test_get_server_by_id(self): + pass + + def test_get_server_details(self): + pass + + def test_get_server_ips(self): + pass + + def test_server_reboot(self): + pass + + def test_server_rebuild(self): + pass + + def test_server_resize(self): + pass + + def test_delete_server_instance(self): + pass diff --git a/nova/tests/api/rackspace/sharedipgroups.py b/nova/tests/api/rackspace/sharedipgroups.py new file mode 100644 index 000000000..b4b281db7 --- /dev/null +++ b/nova/tests/api/rackspace/sharedipgroups.py @@ -0,0 +1,40 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 2010 OpenStack LLC. +# 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 unittest + +from nova.api.rackspace import sharedipgroups +from nova.tests.api.test_helper import * + +class SharedIpGroupsTest(unittest.TestCase): + def setUp(self): + self.stubs = stubout.StubOutForTesting() + + def tearDown(self): + self.stubs.UnsetAll() + + def test_get_shared_ip_groups(self): + pass + + def test_create_shared_ip_group(self): + pass + + def test_delete_shared_ip_group(self): + pass + + + diff --git a/nova/api/test.py b/nova/tests/api/test.py index 51b114b8e..59c4adc3d 100644 --- a/nova/api/test.py +++ b/nova/tests/api/test.py @@ -26,7 +26,7 @@ import webob import webob.dec from nova import api - +from nova.tests.api.test_helper import * class Test(unittest.TestCase): @@ -52,10 +52,8 @@ class Test(unittest.TestCase): result = webob.Request.blank('/test/cloud').get_response(api.API()) self.assertNotEqual(result.body, "/cloud") + def test_query_api_version(self): + pass -class APIStub(object): - """Class to verify request and mark it was called.""" - - @webob.dec.wsgify - def __call__(self, req): - return req.path_info +if __name__ == '__main__': + unittest.main() diff --git a/nova/tests/api/test_helper.py b/nova/tests/api/test_helper.py new file mode 100644 index 000000000..8151a4af6 --- /dev/null +++ b/nova/tests/api/test_helper.py @@ -0,0 +1,7 @@ +import webob.dec + +class APIStub(object): + """Class to verify request and mark it was called.""" + @webob.dec.wsgify + def __call__(self, req): + return req.path_info diff --git a/nova/wsgi_test.py b/nova/tests/api/wsgi_test.py index 786dc1bce..786dc1bce 100644 --- a/nova/wsgi_test.py +++ b/nova/tests/api/wsgi_test.py |
