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_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)