File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ import os
55from synapse_pay_rest import Client
66
77required = {
8- ' client_id' : os.environ[' CLIENT_ID ' ], # your client id
9- ' client_secret' : os.environ[' CLIENT_SECRET ' ], # your client secret
8+ ' client_id' : os.environ[' TEST_CLIENT_ID ' ], # your client id
9+ ' client_secret' : os.environ[' TEST_CLIENT_SECRET ' ], # your client secret
1010 ' fingerprint' : ' user_fingerprint' ,
1111 ' ip_address' : ' 127.0.0.1' , # user's IP
1212}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def test_properties(self):
2626 self .assertIsInstance (self .client .trans , Trans )
2727
2828 def test_passes_correct_base_url_to_http_client (self ):
29- sandbox = 'https://sandbox.synapsepay .com/api/3 '
29+ sandbox = 'https://uat-api.synapsefi .com/v3.1 '
3030 production = 'https://synapsepay.com/api/3'
3131 self .assertEqual (sandbox , self .client .http_client .base_url )
3232
Original file line number Diff line number Diff line change @@ -8,7 +8,22 @@ def setUp(self):
88 print ('\n {0}.{1}' .format (type (self ).__name__ , self ._testMethodName ))
99 self .client = test_client
1010
11- def test_404_error (self ):
11+ # TODO. Build an actual Response object manually?
12+ # def test_400_error(self):
13+ # response = {
14+ # 'error': {
15+ # 'en': "Unable to verify document information. Please submit a valid copy of passport/driver's license."
16+ # },
17+ # 'error_code': '400',
18+ # 'http_code': '409',
19+ # 'success': False
20+ # }
21+ # error = ErrorFactory.from_response(response)
22+ # self.assertEqual(response['error']['en'], error.message)
23+ # self.assertEqual(response['error_code'], error.code)
24+ # self.assertIsInstance(error, NotFoundError)
25+
26+ def test_not_found_error (self ):
1227 user_id = '11111111111111'
1328 with self .assertRaises (NotFoundError ):
1429 self .client .users .get (user_id )
Original file line number Diff line number Diff line change 11import os
22from synapse_pay_rest .client import Client
33
4- CLIENT_ID = os .environ ['CLIENT_ID ' ]
5- CLIENT_SECRET = os .environ ['CLIENT_SECRET ' ]
6- FINGERPRINT = os . environ [ 'FINGERPRINT' ]
4+ CLIENT_ID = os .environ ['TEST_CLIENT_ID ' ]
5+ CLIENT_SECRET = os .environ ['TEST_CLIENT_SECRET ' ]
6+ FINGERPRINT = 'test_fp'
77IP_ADDRESS = '127.0.0.1'
88
99test_client = Client (
You can’t perform that action at this time.
0 commit comments