Changeset 16393 for main/waeup.kofa/trunk/src
- Timestamp:
- 4 Feb 2021, 09:14:47 (4 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_webservices.py
r16392 r16393 241 241 result = server.get_students_by_department('fac1','dep1', '2012', '100') 242 242 self.assertEqual( 243 result, {'K1000000': ['234', 'Anna Tester', ['COURSE1', 'COURSE2']]}) 243 result, {'K1000000': [ 244 '234', 'Anna Tester', 2004, 100, ['COURSE1', 'COURSE2']]}) 245 result = server.get_students_by_department('fac1','dep1', '0', '100') 246 self.assertEqual( 247 result, {'K1000000': [ 248 '234', 'Anna Tester', 2004, 100, ['COURSE1', 'COURSE2']]}) 244 249 result = server.get_students_by_department('fac1','dep1') 245 250 self.assertEqual( 246 result, {'K1000000': ['234', 'Anna Tester', ['COURSE1', 'COURSE2']]}) 251 result, {'K1000000': [ 252 '234', 'Anna Tester', 2004, 100, ['COURSE1', 'COURSE2']]}) 247 253 result = server.get_students_by_department('fac1','dep2') 248 254 self.assertEqual(result, None) … … 255 261 <value><string>fac1</string></value> 256 262 <value><string>dep1</string></value> 263 <value><int>0</int></value> 264 <value><int>100</int></value> 257 265 </param> 258 266 </params> … … 269 277 <value><string>234</string></value> 270 278 <value><string>Anna Tester</string></value> 279 <value><int>2004</int></value> 280 <value><int>100</int></value> 271 281 <value><array><data> 272 282 <value><string>COURSE1</string></value> -
main/waeup.kofa/trunk/src/waeup/kofa/students/webservices.py
r16392 r16393 165 165 except (TypeError, ValueError): 166 166 pass 167 if session in (None, '' ):167 if session in (None, '',0): 168 168 session= None 169 if level in (None, '' ):169 if level in (None, '',0): 170 170 level= None 171 171 try: … … 186 186 c_ticket.student.matric_number, 187 187 c_ticket.student.display_fullname, 188 c_ticket.student.current_session, 189 c_ticket.student.current_level, 188 190 [c_ticket.code,]) 189 191 else: 190 hitdict[c_ticket.student.student_id][ 2].append(192 hitdict[c_ticket.student.student_id][4].append( 191 193 c_ticket.code,) 192 194 return hitdict
Note: See TracChangeset for help on using the changeset viewer.