Ignore:
Timestamp:
24 Sep 2020, 06:42:10 (4 years ago)
Author:
Henrik Bettermann
Message:

Fallback: Check current year session if session object does not exist.

Location:
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/payoutletbrowser.py

    r15974 r16246  
    5353            'etranzact_payoutlet_enabled', False)
    5454    except KeyError:
    55         return False
     55        session = datetime.now().year
     56        try:
     57            return getattr(grok.getSite()['configuration'][str(session)],
     58                'etranzact_payoutlet_enabled', False)
     59        except KeyError:
     60            return False
    5661
    5762class EtranzactEnterPinActionButtonApplicant(APABApplicant):
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/studentsbrowser.py

    r15974 r16246  
    4444            'etranzact_webconnect_enabled', False)
    4545    except KeyError:
    46         return False
     46        session = datetime.now().year
     47        try:
     48            return getattr(grok.getSite()['configuration'][str(session)],
     49                'etranzact_webconnect_enabled', False)
     50        except KeyError:
     51            return False
    4752
    4853class EtranzactActionButtonStudent(ManageActionButton):
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/tests.py

    r15755 r16246  
    197197    def test_applicant_views(self):
    198198        # Manager can access Etranzact form
    199         self.browser.getLink("Pay via Etranzact").click()
     199        self.browser.getLink("Pay via Etranzact WebConnect").click()
    200200        self.assertTrue("Pay now" in self.browser.contents)
    201201        # Means of testing end here.
     
    203203        self.payment.p_id = TID
    204204        self.browser.open(self.payment_url)
    205         self.browser.getLink("Requery Etranzact History").click()
     205        self.browser.getLink("Requery Etranzact WebConnect History").click()
    206206        self.assertTrue('Wrong checksum.' in self.browser.contents)
    207207        # ... probably because responseurl of the transaction stored in the
     
    242242    def test_student_views(self):
    243243        # Manager can access Etranzact form
    244         self.browser.getLink("Pay via Etranzact").click()
     244        self.browser.getLink("Pay via Etranzact WebConnect").click()
    245245        self.assertTrue("Pay now" in self.browser.contents)
    246246        # Means of testing end here.
     
    248248        self.payment.p_id = TID
    249249        self.browser.open(self.payment_url)
    250         self.browser.getLink("Requery Etranzact History").click()
     250        self.browser.getLink("Requery Etranzact WebConnect History").click()
    251251        self.assertTrue('Wrong checksum.' in self.browser.contents)
    252252        # ... probably because responseurl and amount stored in the
     
    258258    @external_test
    259259    def test_student_payoutlet_views(self):
    260         self.browser.getLink("Enter Etranzact PIN").click()
     260        self.browser.getLink("Pay via Etranzact PayOutlet").click()
    261261        self.browser.getControl(name="confirmation_number").value = '600854291572447457669'
    262262        self.browser.getControl("Submit to Etranzact").click()
    263263        # This response is strange
    264264        self.assertTrue('-3:Wrong Setup' in self.browser.contents)
    265         self.browser.getLink("Enter Etranzact PIN").click()
     265        self.browser.getLink("Pay via Etranzact PayOutlet").click()
    266266        # This confirmation number exists
    267267        self.browser.getControl(name="confirmation_number").value = '500854291572447457669'
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/browser.py

    r15974 r16246  
    4545            'interswitch_enabled', True)
    4646    except KeyError:
    47         return False
     47        session = datetime.now().year
     48        try:
     49            return getattr(grok.getSite()['configuration'][str(session)],
     50                'interswitch_enabled', True)
     51        except KeyError:
     52            return False
    4853
    4954class InterswitchActionButtonStudent(ManageActionButton):
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/studentsbrowser.py

    r16206 r16246  
    4545            'remita_enabled', False)
    4646    except KeyError:
    47         return False
     47        session = datetime.now().year
     48        try:
     49            return getattr(grok.getSite()['configuration'][str(session)],
     50                'remita_enabled', False)
     51        except KeyError:
     52            return False
    4853
    4954# Buttons
Note: See TracChangeset for help on using the changeset viewer.