diff options
author | termie <github@anarkystic.com> | 2012-03-01 11:27:06 -0800 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2012-03-01 15:39:22 -0500 |
commit | dd35d2afbfc7bcd41cd5c68b440f5c502d32d656 (patch) | |
tree | 94e88a260e57bcc1d52cd559083b48cfa8a7edd7 /tests/_ldap_livetest.py | |
parent | f8ba5af130b7ec2d2ec8c0abcadbc27275467ab8 (diff) | |
download | keystone-dd35d2afbfc7bcd41cd5c68b440f5c502d32d656.tar.gz keystone-dd35d2afbfc7bcd41cd5c68b440f5c502d32d656.tar.xz keystone-dd35d2afbfc7bcd41cd5c68b440f5c502d32d656.zip |
standardize ldap and related tests
ldap was accidentally supplying some of its own values rather than using
the built-in fixtures, so it was providing the incorrect interface for a
couple calls.
also adds a test for get_user_by_name (skipped for ldap) and
standardizes the kvs and ldap authenticate calls
fix user authentication live ldap tests
Change-Id: If1ccce1fd9c84622bb89344bc5d5c59b059d03ae
Diffstat (limited to 'tests/_ldap_livetest.py')
-rw-r--r-- | tests/_ldap_livetest.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/_ldap_livetest.py b/tests/_ldap_livetest.py index 76b2e7e1..167e0e51 100644 --- a/tests/_ldap_livetest.py +++ b/tests/_ldap_livetest.py @@ -1,6 +1,7 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 import subprocess +import nose.exc from keystone import config from keystone import test @@ -27,20 +28,20 @@ def delete_object(name): def clear_live_database(): roles = ['keystone_admin'] - groups = ['baz', 'bar', 'tenent4add','fake1','fake2'] - users = ['foo', 'two','fake1','fake2'] + groups = ['baz', 'bar', 'tenent4add', 'fake1', 'fake2'] + users = ['foo', 'two', 'fake1', 'fake2'] roles = ['keystone_admin', 'useless'] for group in groups: for role in roles: - delete_object ('cn=%s,cn=%s,ou=Groups' % (role, group)) + delete_object('cn=%s,cn=%s,ou=Groups' % (role, group)) delete_object('cn=%s,ou=Groups' % group) for user in users: - delete_object ('cn=%s,ou=Users' % user) + delete_object('cn=%s,ou=Users' % user) for role in roles: - delete_object ('cn=%s,ou=Roles' % role) + delete_object('cn=%s,ou=Roles' % role) class LDAPIdentity(test.TestCase, test_backend.IdentityTests): @@ -52,10 +53,9 @@ class LDAPIdentity(test.TestCase, test_backend.IdentityTests): clear_live_database() self.identity_api = identity_ldap.Identity() self.load_fixtures(default_fixtures) - self.user_foo = {'id': 'foo', - 'name': 'FOO', - 'password': 'foo2', - 'tenants': ['bar']} def tearDown(self): test.TestCase.tearDown(self) + + def test_get_user_by_name(self): + raise nose.exc.SkipTest('not implemented in ldap yet') |