コード例 #1
0
 def test_base_url_returns_the_correct_url_for_sandbox(self):
     gocardless.environment = 'sandbox'
     self.assertEqual(Client.get_base_url(), 'https://sandbox.gocardless.com')
     gocardless.environment = "production"
コード例 #2
0
 def test_base_url_returns_the_correct_url_when_set_manually(self):
     old_url = Client.base_url
     Client.base_url = 'https://abc.gocardless.com'
     self.assertEqual(Client.get_base_url(), 'https://abc.gocardless.com')
     Client.base_url = old_url
コード例 #3
0
 def test_base_url_returns_the_correct_url_for_production(self):
     gocardless.environment = 'production'
     self.assertEqual(Client.get_base_url(), 'https://gocardless.com')
コード例 #4
0
 def test_base_url_returns_the_correct_url_for_production(self):
     gocardless.environment = 'production'
     self.assertEqual(Client.get_base_url(), 'https://gocardless.com')
コード例 #5
0
def create_mock_client(details):
    return Client(details["app_id"],
            details["app_secret"],
            access_token=details["token"],
            merchant_id=details["merchant_id"])
コード例 #6
0
 def test_base_url_returns_the_correct_url_when_set_manually(self):
     old_url = Client.base_url
     Client.base_url = 'https://abc.gocardless.com'
     self.assertEqual(Client.get_base_url(), 'https://abc.gocardless.com')
     Client.base_url = old_url
コード例 #7
0
 def test_base_url_returns_the_correct_url_for_sandbox(self):
     gocardless.environment = 'sandbox'
     self.assertEqual(Client.get_base_url(), 'https://sandbox.gocardless.com')
     gocardless.environment = "production"