예제 #1
0
def get_gpa():
    sno = request.cookies.get('sno')
    cookie = request.cookies.get('JSESSIONID')
    year = request.args.get('year', '')
    term = request.args.get('term', '')
    _, result = sysujwxt.get_gpa(cookie.encode('ascii'), sno.encode('ascii'),
                                 year.encode('ascii'), term.encode('ascii'))
    return result
예제 #2
0
def get_gpa():
    sno = request.cookies.get('sno')
    cookie = request.cookies.get('JSESSIONID')
    year = request.args.get('year', '')
    term = request.args.get('term', '')
    _, result = sysujwxt.get_gpa(cookie.encode('ascii'),
                                 sno.encode('ascii'),
                                 year.encode('ascii'),
                                 term.encode('ascii'))
    return result
예제 #3
0
 def test_expired_queries(self):
     success, result = fakesysujwxt.get_score(self.cookie[::-1], self.sno, self.year, self.term)
     self.assertEqual(result, 'expired')
     success, result = fakesysujwxt.get_timetable(self.cookie[::-1], self.year, self.term)
     self.assertEqual(result, 'expired')
     success, result = fakesysujwxt.get_available_courses(self.cookie[::-1], self.year, self.term, '30', '1')
     self.assertEqual(result, 'expired')
     success, result = fakesysujwxt.get_course_result(self.cookie[::-1], self.year, self.term)
     self.assertEqual(result, 'expired')
     success, result = fakesysujwxt.get_earned_credit(self.cookie[::-1], self.sno, self.year, self.term)
     self.assertEqual(result, 'expired')
     success, result = fakesysujwxt.get_gpa(self.cookie[::-1], self.sno, self.year, self.term)
     self.assertEqual(result, 'expired')
예제 #4
0
 def test_get_gpa(self):
     success, result = fakesysujwxt.get_gpa(self.cookie, self.sno, self.year, self.term)
     self.assertTrue(success)