Example #1
0
 def test_get_payment_details_for_currency_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_currency_details("BTC")
     self.assertIsInstance(response, dict)
Example #2
0
 def test_get_payment_details_for_currency_invalid_payment_id_is_invalid(
         self):
     globee_payment = GlobeePayment()
     with self.assertRaises(ValidationError):
         globee_payment.get_payment_currency_details("BTC", "INVALID_KEY")