server/test/unittest_ldapuser.py
branchstable
changeset 8520 fcd048fa6e6d
parent 8478 e099ebc65e61
child 8524 d2a6163ce0d5
equal deleted inserted replaced
8519:e436688f75f4 8520:fcd048fa6e6d
   134         self._pull()
   134         self._pull()
   135         # still deactivated, but a warning has been emitted ...
   135         # still deactivated, but a warning has been emitted ...
   136         self.assertEqual(self.execute('Any N WHERE U login "syt", '
   136         self.assertEqual(self.execute('Any N WHERE U login "syt", '
   137                                       'U in_state S, S name N').rows[0][0],
   137                                       'U in_state S, S name N').rows[0][0],
   138                          'deactivated')
   138                          'deactivated')
       
   139         # test reactivating the user isn't enough to authenticate, as the native source
       
   140         # refuse to authenticate user from other sources
       
   141         user = self.execute('CWUser U WHERE U login "syt"').get_entity(0, 0)
       
   142         user.cw_adapt_to('IWorkflowable').fire_transition('activate')
       
   143         self.commit()
       
   144         self.assertRaises(AuthenticationError, self.repo.connect, 'syt', password='syt')
   139 
   145 
   140 class LDAPFeedSourceTC(LDAPTestBase):
   146 class LDAPFeedSourceTC(LDAPTestBase):
   141     test_db_id = 'ldap-feed'
   147     test_db_id = 'ldap-feed'
   142 
   148 
   143     @classmethod
   149     @classmethod