Changeset 10515 for main/waeup.cas


Ignore:
Timestamp:
21 Aug 2013, 10:56:55 (11 years ago)
Author:
Henrik Bettermann
Message:

Rename get_moodle_data.

Location:
main/waeup.cas/trunk/waeup/cas
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.cas/trunk/waeup/cas/authenticators.py

    r10510 r10515  
    206206            if principal is not None:
    207207                if principal['type'] == 'student':
    208                     student = proxy.get_moodle_data(username)
     208                    student = proxy.get_student_moodle_data(username)
    209209                    try:
    210210                        # Usernames in Moodle must not contain uppercase
     
    220220                        if not 'Username already exists' in faultstring:
    221221                            return (False, faultstring)
    222                         # user exists
    223                         pass
    224222                    try:
    225223                        result = moodle.core_user_get_users([
  • main/waeup.cas/trunk/waeup/cas/tests/test_authenticators.py

    r10514 r10515  
    167167            self._check_credentials, 'check_student_credentials')
    168168        self.register_function(
    169             self._get_moodle_data, 'get_moodle_data')
     169            self._get_student_moodle_data, 'get_student_moodle_data')
    170170
    171171    def _check_credentials(self, username, password):
     
    188188        return None
    189189
    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.
    192192        if username == 'bird':
    193193            return dict(email='aa@aa.aa',
     
    289289            'id': 'pig',
    290290            'type': 'applicant'}
    291         result = proxy.get_moodle_data('pig')
     291        result = proxy.get_student_moodle_data('pig')
    292292        assert result == {
    293293            'lastname': 'Charles',
Note: See TracChangeset for help on using the changeset viewer.