Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_default_base_uri_retrieval():
backend = SparkPostEmailBackend()
assert backend.client.base_uri.startswith('https://' + US_API)
def __init__(self, fail_silently=False, **kwargs):
super(SparkPostEmailBackend, self)\
.__init__(fail_silently=fail_silently, **kwargs)
sp_api_key = getattr(settings, 'SPARKPOST_API_KEY', None)
sp_base_uri = getattr(settings, 'SPARKPOST_BASE_URI', US_API)
self.client = SparkPost(sp_api_key, sp_base_uri)