def test_user_attrs(self):
     settings.ldap_settings = TestSettings(
         AUTH_LDAP_USER_ATTR_MAP = {
             'foo': 'ldap_foo',
             'bar': 'ldap_bar',
             },
         LDAP_PIXIEDUST_DEFAULT_ATTR_MAP = {
             'frob': 'nicate'
         })
     user = TestUser(username="******", foo='x', bar='y', password='******')
     fixture = SynchronisingUserAdapter(user)
     self.failUnlessEqual(fixture.user_attrs(), {
         'ldap_foo': ['x'],
         'ldap_bar': ['y'],
         'frob': ['nicate'],
         'objectClass': ['organizationalPerson', 'inetOrgPerson'],
         'userPassword': ['{SSHA}QkJTQUxU'],
         })
Example #2
0
 def test_user_attrs(self):
     settings.ldap_settings = TestSettings(
         AUTH_LDAP_USER_ATTR_MAP={
             'foo': 'ldap_foo',
             'bar': 'ldap_bar',
         },
         LDAP_PIXIEDUST_DEFAULT_ATTR_MAP={'frob': 'nicate'})
     user = TestUser(username="******",
                     foo='x',
                     bar='y',
                     password='******')
     fixture = SynchronisingUserAdapter(user)
     self.failUnlessEqual(
         fixture.user_attrs(), {
             'ldap_foo': ['x'],
             'ldap_bar': ['y'],
             'frob': ['nicate'],
             'objectClass': ['organizationalPerson', 'inetOrgPerson'],
             'userPassword': ['{SSHA}QkJTQUxU'],
         })