Ignore:
Timestamp:
15 May 2012, 15:24:11 (12 years ago)
Author:
uli
Message:

Finetune media file distributions for students a bit: make sure that for lower numbers 10,000 numbers share a path.

File:
1 edited

Legend:

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

    r8448 r8452  
    4949            path_from_studid('K1000000'), u'01000/K1000000')
    5050        self.assertEqual(
    51             path_from_studid('KM123456'), u'00123/KM123456')
     51            path_from_studid('K1234567'), u'01234/K1234567')
     52        self.assertEqual(
     53            path_from_studid('K12345678'), u'12345/K12345678')
     54        # The algorithm works also for overlong numbers, just to be
     55        # sure.
     56        self.assertEqual(
     57            path_from_studid('K123456789'), u'123456/K123456789')
     58        # low numbers (< 10**6) are treated special: they get max. of
     59        # 10,000 entries. That's mainly because of old students
     60        # migrated into our portal.
     61        self.assertEqual(
     62            path_from_studid('KM123456'), u'00120/KM123456')
    5263        return
    5364
Note: See TracChangeset for help on using the changeset viewer.