def get_course_result(): sno = request.cookies.get('sno') cookie = request.cookies.get('JSESSIONID') year, term = [request.args[x] for x in ['year', 'term']] _, result = sysujwxt.get_course_result(cookie.encode('ascii'), year.encode('ascii'), term.encode('ascii')) return result
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')
def test_get_course_result(self): success, result = fakesysujwxt.get_course_result(self.cookie, self.year, self.term) self.assertTrue(success)