Exemplo n.º 1
0
def get_earned_credit():
    sno = request.cookies.get('sno')
    cookie = request.cookies.get('JSESSIONID')
    year = request.args.get('year', '')
    term = request.args.get('term', '')
    _, result = sysujwxt.get_earned_credit(cookie.encode('ascii'),
                                           sno.encode('ascii'),
                                           year.encode('ascii'),
                                           term.encode('ascii'))
    return result
Exemplo n.º 2
0
def get_earned_credit():
    sno = request.cookies.get('sno')
    cookie = request.cookies.get('JSESSIONID')
    year = request.args.get('year', '')
    term = request.args.get('term', '')
    _, result = sysujwxt.get_earned_credit(cookie.encode('ascii'),
                                           sno.encode('ascii'),
                                           year.encode('ascii'),
                                           term.encode('ascii'))
    return result
Exemplo n.º 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')
Exemplo n.º 4
0
 def test_get_earned_credit(self):
     success, result = fakesysujwxt.get_earned_credit(self.cookie, self.sno, self.year, self.term)
     self.assertTrue(success)