server/test/unittest_ldapuser.py
branchstable
changeset 8524 d2a6163ce0d5
parent 8520 fcd048fa6e6d
child 8634 22f1800ca6a9
equal deleted inserted replaced
8523:410cbb14f0f5 8524:d2a6163ce0d5
   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
   139         # test reactivating the user isn't enough to authenticate, as the native source
   140         # refuse to authenticate user from other sources
   140         # refuse to authenticate user from other sources
       
   141         os.system(deletecmd)
       
   142         self._pull()
   141         user = self.execute('CWUser U WHERE U login "syt"').get_entity(0, 0)
   143         user = self.execute('CWUser U WHERE U login "syt"').get_entity(0, 0)
   142         user.cw_adapt_to('IWorkflowable').fire_transition('activate')
   144         user.cw_adapt_to('IWorkflowable').fire_transition('activate')
   143         self.commit()
   145         self.commit()
   144         self.assertRaises(AuthenticationError, self.repo.connect, 'syt', password='syt')
   146         self.assertRaises(AuthenticationError, self.repo.connect, 'syt', password='syt')
   145 
   147