~ubuntu-branches/ubuntu/wily/keystone/wily

« back to all changes in this revision

Viewing changes to keystone/tests/_ldap_livetest.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-10-02 11:46:14 UTC
  • mfrom: (1.1.37)
  • Revision ID: package-import@ubuntu.com-20131002114614-pw4xkjdvowr9u34w
Tags: 1:2013.2~rc1-0ubuntu1
* New upstream version.
* debian/control:
  - Add versioned dependencies to python-pbr, python-dogpile.cache,
    python-oslo.config, python-webob, python-pam, python-sqlalchemy,
    python-testtools, and python-requests.
  - Added python-greenlet, python-requests, python-netifaces,
    and python-setuptools as a build dependency.
  - Dropped python-swift, python-unittest, python-d2to1,
    as a build dependency.
  - Bumped versioned depends for python-keystoneclient.
* debian/patches/disable-oauth2.patch: Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4
2
2
 
3
 
# Copyright 2012 OpenStack LLC
 
3
# Copyright 2012 OpenStack Foundation
4
4
#
5
5
# Licensed under the Apache License, Version 2.0 (the "License"); you may
6
6
# not use this file except in compliance with the License. You may obtain
23
23
from keystone import config
24
24
from keystone import exception
25
25
from keystone.identity.backends import ldap as identity_ldap
26
 
from keystone.tests import core as test
27
 
 
28
 
import test_backend_ldap
 
26
from keystone import tests
 
27
from keystone.tests import test_backend_ldap
29
28
 
30
29
 
31
30
CONF = config.CONF
73
72
                      'ou': 'UserGroups'})
74
73
 
75
74
    def _set_config(self):
76
 
        self.config([test.etcdir('keystone.conf.sample'),
77
 
                     test.testsdir('test_overrides.conf'),
78
 
                     test.testsdir('backend_liveldap.conf')])
 
75
        self.config([tests.etcdir('keystone.conf.sample'),
 
76
                     tests.testsdir('test_overrides.conf'),
 
77
                     tests.testsdir('backend_liveldap.conf')])
79
78
 
80
79
    def test_build_tree(self):
81
80
        """Regression test for building the tree names
86
85
        self.assertEquals(user_api.tree_dn, CONF.ldap.user_tree_dn)
87
86
 
88
87
    def tearDown(self):
89
 
        test.TestCase.tearDown(self)
 
88
        tests.TestCase.tearDown(self)
90
89
 
91
90
    def test_ldap_dereferencing(self):
92
91
        alt_users_ldif = {'objectclass': ['top', 'organizationalUnit'],
227
226
 
228
227
    def test_create_unicode_user_name(self):
229
228
        self.skipTest('Addressed by bug #1172106')
 
229
 
 
230
    def test_create_project_case_sensitivity(self):
 
231
        # The attribute used for the live LDAP tests is case insensitive.
 
232
 
 
233
        def call_super():
 
234
            super(LiveLDAPIdentity, self).\
 
235
                test_create_project_case_sensitivity()
 
236
 
 
237
        self.assertRaises(exception.Conflict, call_super)
 
238
 
 
239
    def test_create_user_case_sensitivity(self):
 
240
        # The attribute used for the live LDAP tests is case insensitive.
 
241
 
 
242
        def call_super():
 
243
            super(LiveLDAPIdentity, self).test_create_user_case_sensitivity()
 
244
 
 
245
        self.assertRaises(exception.Conflict, call_super)
 
246
 
 
247
    def test_project_update_missing_attrs_with_a_falsey_value(self):
 
248
        # The description attribute doesn't allow an empty value.
 
249
 
 
250
        def call_super():
 
251
            super(LiveLDAPIdentity, self).\
 
252
                test_project_update_missing_attrs_with_a_falsey_value()
 
253
 
 
254
        self.assertRaises(ldap.INVALID_SYNTAX, call_super)