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"
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
def test_base_url_returns_the_correct_url_for_production(self): gocardless.environment = 'production' self.assertEqual(Client.get_base_url(), 'https://gocardless.com')
def create_mock_client(details): return Client(details["app_id"], details["app_secret"], access_token=details["token"], merchant_id=details["merchant_id"])