Skip to content

Commit

Permalink
Fix live LDAP tests
Browse files Browse the repository at this point in the history
The live LDAP tests were failing. The tests for case
sensitivity for project name and user name failed because the
attribute is not case sensitive. The test for updating a
missing attribute with a falsy value was failing because the
attribute chosen for the project description does not allow an
empty string.

Change-Id: I723c40b5eab24ac13e27fd040d0d881998f106db
Related-Bug: #1231772
  • Loading branch information
Brant Knudson committed Sep 27, 2013
1 parent 1db2618 commit 333d497
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions keystone/tests/_ldap_livetest.py
Expand Up @@ -226,3 +226,29 @@ def test_user_enable_attribute_mask(self):

def test_create_unicode_user_name(self):
self.skipTest('Addressed by bug #1172106')

def test_create_project_case_sensitivity(self):
# The attribute used for the live LDAP tests is case insensitive.

def call_super():
super(LiveLDAPIdentity, self).\
test_create_project_case_sensitivity()

self.assertRaises(exception.Conflict, call_super)

def test_create_user_case_sensitivity(self):
# The attribute used for the live LDAP tests is case insensitive.

def call_super():
super(LiveLDAPIdentity, self).test_create_user_case_sensitivity()

self.assertRaises(exception.Conflict, call_super)

def test_project_update_missing_attrs_with_a_falsey_value(self):
# The description attribute doesn't allow an empty value.

def call_super():
super(LiveLDAPIdentity, self).\
test_project_update_missing_attrs_with_a_falsey_value()

self.assertRaises(ldap.INVALID_SYNTAX, call_super)

0 comments on commit 333d497

Please sign in to comment.