How to use the createsend.createsend.ExpiredOAuthToken function in createsend

To help you get started, we’ve selected a few createsend examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github campaignmonitor / createsend-python / test / test_authentication.py View on Github external
def test_raise_error_when_authenticating_with_oauth_and_token_expired(self):
        self.cs = CreateSend(self.oauth_auth_details)
        self.cs.stub_request(
            "systemdate.json", 'expired_oauth_token_api_error.json', status=401)
        self.assertRaises(ExpiredOAuthToken, self.cs.systemdate)