Exemple #1
0
 def test_GPACreateSPRFClass(self):
     testSPRFforGPA = GPA('This is to test the SPRF function for the grade point average of 2.9', '1543')
     self.assertIsNotNone(testSPRFforGPA)
     self.assertEqual(True, testSPRFforGPA.checkContext('gpa|grade\spoint\saverage|maintain'))
     self.assertEqual('2.9', testSPRFforGPA.getGPA())
     self.assertIsNotNone(testSPRFforGPA.getScholarshipPackageRequirementFormat())
     test_SPRF = testSPRFforGPA.getScholarshipPackageRequirementFormat()
     self.assertEqual('1543', test_SPRF.scholarshipPackageId)
     self.assertEqual('1', test_SPRF.attributeId)
     self.assertEqual('>=', test_SPRF.requirementType)
     self.assertEqual('2.9', test_SPRF.requirementValue)
     self.assertEqual('0', test_SPRF.logicGroup)
Exemple #2
0
 def test_updateLogicGroup(self):
     testUpdateLogicGroup = GPA('Undergraduates must have a 3.0 GPA, while graduate students must have a 3.25', '5')
     self.assertIsNotNone(testUpdateLogicGroup)
     testUpdateLogicGroup.getGPA()
     self.assertEqual('1', testUpdateLogicGroup.logicGroup)
     test_SPRFLogicGroup = testUpdateLogicGroup.getScholarshipPackageRequirementFormat()
     self.assertEqual('1', test_SPRFLogicGroup.logicGroup)
Exemple #3
0
 def test_GPACreateSPRFClass(self):
     testSPRFforGPA = GPA(
         'This is to test the SPRF function for the grade point average of 2.9',
         '1543')
     self.assertIsNotNone(testSPRFforGPA)
     self.assertEqual(
         True,
         testSPRFforGPA.checkContext('gpa|grade\spoint\saverage|maintain'))
     self.assertEqual('2.9', testSPRFforGPA.getGPA())
     self.assertIsNotNone(
         testSPRFforGPA.getScholarshipPackageRequirementFormat())
     test_SPRF = testSPRFforGPA.getScholarshipPackageRequirementFormat()
     self.assertEqual('1543', test_SPRF.scholarshipPackageId)
     self.assertEqual('1', test_SPRF.attributeId)
     self.assertEqual('>=', test_SPRF.requirementType)
     self.assertEqual('2.9', test_SPRF.requirementValue)
     self.assertEqual('0', test_SPRF.logicGroup)
Exemple #4
0
 def test_updateLogicGroup(self):
     testUpdateLogicGroup = GPA(
         'Undergraduates must have a 3.0 GPA, while graduate students must have a 3.25',
         '5')
     self.assertIsNotNone(testUpdateLogicGroup)
     testUpdateLogicGroup.getGPA()
     self.assertEqual('1', testUpdateLogicGroup.logicGroup)
     test_SPRFLogicGroup = testUpdateLogicGroup.getScholarshipPackageRequirementFormat(
     )
     self.assertEqual('1', test_SPRFLogicGroup.logicGroup)
Exemple #5
0
 def doGPAParser(self, eligibility, scholarshipId):
     parseGPA = GPA(eligibility, scholarshipId)
     if parseGPA.getGPA() != '':
         # print(parseGPA.getGPA())
         # print(parseGPA.getScholarshipPackageRequirementFormat().getStringValue())
         return parseGPA.getScholarshipPackageRequirementFormat()
Exemple #6
0
 def doGPAParser(self):
     for line in self.textLines:
         parseGPA = GPA(line)
         if parseGPA.getGPA() != '':
             return parseGPA.getScholarshipPackageRequirementFormat()