diff options
| author | Chuck Short <zulcss@ubuntu.com> | 2011-03-28 13:41:07 -0400 |
|---|---|---|
| committer | Chuck Short <zulcss@ubuntu.com> | 2011-03-28 13:41:07 -0400 |
| commit | ea9176177e5bddf6b70b200967bee0f3717a5e8a (patch) | |
| tree | f72477a957ecca175f5008605c4e3ababd9430a0 /nova/tests | |
| parent | 8922630e70e97b52e363a861c76fe4a01b8418ff (diff) | |
| parent | ad45419e78deadbcfaca0a182fc038f9d289d4ec (diff) | |
Merge trunk
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/api/openstack/test_images.py | 13 | ||||
| -rw-r--r-- | nova/tests/test_auth.py | 8 |
2 files changed, 12 insertions, 9 deletions
diff --git a/nova/tests/api/openstack/test_images.py b/nova/tests/api/openstack/test_images.py index 1cdccadd6..738bdda19 100644 --- a/nova/tests/api/openstack/test_images.py +++ b/nova/tests/api/openstack/test_images.py @@ -43,9 +43,14 @@ from nova.tests.api.openstack import fakes FLAGS = flags.FLAGS -class BaseImageServiceTests(object): +class _BaseImageServiceTests(test.TestCase): """Tasks to test for all image services""" + def __init__(self, *args, **kwargs): + super(_BaseImageServiceTests, self).__init__(*args, **kwargs) + self.service = None + self.context = None + def test_create(self): fixture = self._make_fixture('test image') num_images = len(self.service.index(self.context)) @@ -116,8 +121,7 @@ class BaseImageServiceTests(object): return fixture -class LocalImageServiceTest(test.TestCase, - BaseImageServiceTests): +class LocalImageServiceTest(_BaseImageServiceTests): """Tests the local image service""" @@ -147,8 +151,7 @@ class LocalImageServiceTest(test.TestCase, self.assertEqual(3, len(found_image_ids), len(found_image_ids)) -class GlanceImageServiceTest(test.TestCase, - BaseImageServiceTests): +class GlanceImageServiceTest(_BaseImageServiceTests): """Tests the Glance image service, in particular that metadata translation works properly. diff --git a/nova/tests/test_auth.py b/nova/tests/test_auth.py index 885596f56..f8a1b1564 100644 --- a/nova/tests/test_auth.py +++ b/nova/tests/test_auth.py @@ -80,10 +80,10 @@ class user_and_project_generator(object): self.manager.delete_project(self.project) -class AuthManagerTestCase(object): +class _AuthManagerBaseTestCase(test.TestCase): def setUp(self): FLAGS.auth_driver = self.auth_driver - super(AuthManagerTestCase, self).setUp() + super(_AuthManagerBaseTestCase, self).setUp() self.flags(connection_type='fake') self.manager = manager.AuthManager(new=True) @@ -331,11 +331,11 @@ class AuthManagerTestCase(object): self.assertTrue(user.is_admin()) -class AuthManagerLdapTestCase(AuthManagerTestCase, test.TestCase): +class AuthManagerLdapTestCase(_AuthManagerBaseTestCase): auth_driver = 'nova.auth.ldapdriver.FakeLdapDriver' -class AuthManagerDbTestCase(AuthManagerTestCase, test.TestCase): +class AuthManagerDbTestCase(_AuthManagerBaseTestCase): auth_driver = 'nova.auth.dbdriver.DbDriver' |
