Ignore:
Timestamp:
31 Aug 2012, 14:54:18 (12 years ago)
Author:
Henrik Bettermann
Message:

When transferring students StudyLevelSource? will be called in the context of a student. Thus study_levels is not necessarily a function of a studycourse.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_vocabularies.py

    r7811 r9133  
    2121
    2222
    23 class FakeStudyCourse(object):
     23class FakeStudyCourse(dict):
    2424
    25     def __init__(self):
     25    def __init__(object):
    2626        cert = Certificate(code="CERT1")
    2727        cert.start_level = 100
    2828        cert.end_level = 500
    2929        self.certificate = cert
     30
     31    def get(self, attr, default=None):
     32        try:
     33            return self.__getattribute__(attr)
     34        except AttributeError:
     35            return default
    3036
    3137class VocabularyTests(unittest.TestCase):
Note: See TracChangeset for help on using the changeset viewer.