Changeset 10515
- Timestamp:
- 21 Aug 2013, 10:56:55 (11 years ago)
- Location:
- main/waeup.cas/trunk/waeup/cas
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.cas/trunk/waeup/cas/authenticators.py
r10510 r10515 206 206 if principal is not None: 207 207 if principal['type'] == 'student': 208 student = proxy.get_ moodle_data(username)208 student = proxy.get_student_moodle_data(username) 209 209 try: 210 210 # Usernames in Moodle must not contain uppercase … … 220 220 if not 'Username already exists' in faultstring: 221 221 return (False, faultstring) 222 # user exists223 pass224 222 try: 225 223 result = moodle.core_user_get_users([ -
main/waeup.cas/trunk/waeup/cas/tests/test_authenticators.py
r10514 r10515 167 167 self._check_credentials, 'check_student_credentials') 168 168 self.register_function( 169 self._get_ moodle_data, 'get_moodle_data')169 self._get_student_moodle_data, 'get_student_moodle_data') 170 170 171 171 def _check_credentials(self, username, password): … … 188 188 return None 189 189 190 def _get_ moodle_data(self, username):191 # fake waeup.kofa get_ moodle_data method.190 def _get_student_moodle_data(self, username): 191 # fake waeup.kofa get_student_moodle_data method. 192 192 if username == 'bird': 193 193 return dict(email='aa@aa.aa', … … 289 289 'id': 'pig', 290 290 'type': 'applicant'} 291 result = proxy.get_ moodle_data('pig')291 result = proxy.get_student_moodle_data('pig') 292 292 assert result == { 293 293 'lastname': 'Charles',
Note: See TracChangeset for help on using the changeset viewer.