File: test_chargeback.py

package info (click to toggle)
python-mercadopago 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,104 kB
  • sloc: python: 2,191; makefile: 4
file content (28 lines) | stat: -rw-r--r-- 576 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
    Module: test_chargeback
"""
import os
import unittest
import mercadopago


class TestChargeback(unittest.TestCase):
    """
    Test Module: Chargeback
    """
    sdk = mercadopago.SDK(os.environ['ACCESS_TOKEN'])

    def test_search_chargeback(self):
        """
        Test Function: Chargeback
        """
        filters_chargeback = {
            "payment_id": "12345"
        }

        chargebacks = self.sdk.chargeback().search(filters=filters_chargeback)
        self.assertEqual(chargebacks["status"], 200)


if __name__ == "__main__":
    unittest.main()