-
Notifications
You must be signed in to change notification settings - Fork 43
/
test_suite.py
66 lines (57 loc) · 2.38 KB
/
test_suite.py
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import doctest
import unittest
import sys
import copy
from tests.testapiclients import Test_ApiClients
from tests.testapiusers import Test_ApiUsers
from tests.testapiwallets import Test_ApiWallets
from tests.testcardregistrations import Test_CardRegistrations
from tests.testconfigurations import Test_Configurations
from tests.testpayins import Test_PayIns
from tests.testpayouts import Test_PayOuts
from tests.testrefunds import Test_Refunds
from tests.testtokens import Test_Tokens
from tests.testtransfers import Test_Transfers
from tests.testevents import Test_ApiEvents
from tests.testcardpreauthorizations import Test_CardPreAuthorization
from tests.testhooks import Test_Hooks
from tests.testkycdocuments import Test_KycDocuments
from tests.testdisputes import Test_Disputes
from tests.testidempotency import Test_Idempotency
from tests.testmandates import Test_Mandates
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(Test_ApiClients))
suite.addTest(unittest.makeSuite(Test_ApiUsers))
suite.addTest(unittest.makeSuite(Test_ApiWallets))
suite.addTest(unittest.makeSuite(Test_Configurations))
suite.addTest(unittest.makeSuite(Test_PayIns))
suite.addTest(unittest.makeSuite(Test_PayOuts))
suite.addTest(unittest.makeSuite(Test_Transfers))
suite.addTest(unittest.makeSuite(Test_Tokens))
suite.addTest(unittest.makeSuite(Test_Refunds))
suite.addTest(unittest.makeSuite(Test_CardRegistrations))
suite.addTest(unittest.makeSuite(Test_CardPreAuthorization))
suite.addTest(unittest.makeSuite(Test_ApiEvents))
suite.addTest(unittest.makeSuite(Test_Hooks))
suite.addTest(unittest.makeSuite(Test_KycDocuments))
suite.addTest(unittest.makeSuite(Test_Idempotency))
suite.addTest(unittest.makeSuite(Test_Mandates))
# IMPORTANT NOTE!
#
# Due to the fact the disputes CANNOT be created on user's side,
# a special approach in testing is needed.
# In order to get the tests below pass, a bunch of disputes has
# to be prepared on the API's side - if it's not, the tests won't pass.
#
# Uncomment "suite.addTest(unittest.makeSuite(Test_Disputes))" line below
# to include disputes unit tests into the testing queue.
#suite.addTest(unittest.makeSuite(Test_Disputes))
modules = ['mangopaysdk']
for module in modules:
m = __import__(module, fromlist=[module])
runner = unittest.TextTestRunner(verbosity=1)
result = runner.run(suite)
#if not result.wasSuccessful():
#sys.exit(1)