summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJamie Lennox <jlennox@redhat.com>2013-07-10 16:45:18 +1000
committerJamie Lennox <jlennox@redhat.com>2013-07-19 09:50:40 +1000
commit2aaa902d6eb16fe9ee2e7bc262c1b29731c03a0c (patch)
tree9deb913fd4bed6153414cbd7dd7a96fff0dfe421 /tests
parent53ed50ddd0cdebd1b6329f47caac3c8d8b41cd7e (diff)
downloadkeystone-2aaa902d6eb16fe9ee2e7bc262c1b29731c03a0c.tar.gz
keystone-2aaa902d6eb16fe9ee2e7bc262c1b29731c03a0c.tar.xz
keystone-2aaa902d6eb16fe9ee2e7bc262c1b29731c03a0c.zip
Load app before loading legacy client in tests.
When you load an old version of keystoneclient doing legacy tests and then start the test app the ec2 work that depends on keystoneclient sees the recently loaded legacy one which doesn't have the required modules in it. If we load the app first the ec2 modules are resolved and finds the original keystone client. The ec2 module then uses 'from keystoneclient.contrib.ec2 import utils as ec2_utils' so the ec2_utils reference is kept in the file scope so isn't affected by the tests changing keystoneclient. It is not a long term fix for bug 1178532 but it solves the immediate symptoms when running client tests independently. Change-Id: I7267ca0d4740f037884fae95f8a6562ee86584b9
Diffstat (limited to 'tests')
-rw-r--r--tests/test_keystoneclient.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_keystoneclient.py b/tests/test_keystoneclient.py
index 5c0d2f5b..07bcdac4 100644
--- a/tests/test_keystoneclient.py
+++ b/tests/test_keystoneclient.py
@@ -38,6 +38,9 @@ class CompatTestCase(test.TestCase):
def setUp(self):
super(CompatTestCase, self).setUp()
+ self.public_server = self.serveapp('keystone', name='main')
+ self.admin_server = self.serveapp('keystone', name='admin')
+
revdir = test.checkout_vendor(*self.get_checkout())
self.add_path(revdir)
self.clear_module('keystoneclient')
@@ -46,9 +49,6 @@ class CompatTestCase(test.TestCase):
self.token_provider_api = token.provider.Manager()
self.load_fixtures(default_fixtures)
- self.public_server = self.serveapp('keystone', name='main')
- self.admin_server = self.serveapp('keystone', name='admin')
-
# TODO(termie): add an admin user to the fixtures and use that user
# override the fixtures, for now
self.metadata_foobar = self.identity_api.add_role_to_user_and_project(