Example #1
0
 def test_get_payment_details_valid(self):
     data = {
         'total': 13.37,
         'currency': 'EUR',
         'customer': {
             'name': 'foobar',
             'email': '*****@*****.**'
         },
     }
     globee_payment = GlobeePayment(payment_data=data)
     self.assertTrue(globee_payment.check_required_fields())
     self.assertIn("https://test.globee.com/",
                   globee_payment.create_request())
     response = globee_payment.get_payment_details()
     self.assertIsInstance(response, list)
Example #2
0
 def test_get_payment_details_invalid_payment_id_is_invalid(self):
     globee_payment = GlobeePayment()
     with self.assertRaises(ValidationError):
         globee_payment.get_payment_details("INVALID_KEY")