Ejemplo n.º 1
0
 def test_insufficient_funds(self):
     message = Message(subclass='error',
                       context='processor.transaction',
                       key='declined_insufficient_funds')
     self.assertEqual(
         message.description,
         'The transaction was declined due to insufficient funds.')
Ejemplo n.º 2
0
 def test_expiry_year_invalid(self):
     message = Message(subclass='error',
                       context='input.expiry_year',
                       key='invalid')
     self.assertEqual(
         message.description,
         'The expiration date year was invalid, or prior to today.')
Ejemplo n.º 3
0
 def test_issuer_unavailable(self):
     message = Message(subclass='error',
                       context='processor.issuer',
                       key='unavailable')
     self.assertEqual(
         message.description,
         'The authorization did not respond within the alloted time.')
Ejemplo n.º 4
0
 def test_amount_invalid(self):
     message = Message(subclass='error',
                       context='input.amount',
                       key='invalid')
     self.assertEqual(message.description,
                      'The transaction amount was invalid.')
Ejemplo n.º 5
0
 def test_transaction_success(self):
     message = Message(subclass='info',
                       context='processor.transaction',
                       key='success')
     self.assertEqual(message.description,
                      'The transaction was successful.')
Ejemplo n.º 6
0
 def test_card_invalid(self):
     message = Message(subclass='error',
                       context='input.card_number',
                       key='invalid')
     self.assertEqual(message.description, 'The card number was invalid.')
Ejemplo n.º 7
0
 def test_issuer_call(self):
     message = Message(subclass='error',
                       context='processor.issuer',
                       key='call')
     self.assertEqual(message.description,
                      'Call the card issuer for further instructions.')
Ejemplo n.º 8
0
 def test_transaction_declined(self):
     message = Message(subclass='error',
                       context='processor.transaction',
                       key='declined')
     self.assertEqual(message.description, 'The card was declined.')