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_group_invalidkeys_fail(self):
sObj = Splitwise('consumerkey', 'consumersecret', {"oauth_token": "sdsd", "oauth_token_secret": "sdsdd"})
group = Group()
with self.assertRaises(SplitwiseUnauthorizedException):
sObj.createGroup(group)
def setUp(self):
self.sObj = Splitwise('consumerkey', 'consumersecret')
def setUp(self):
consumer_key = os.environ['CONSUMER_KEY']
consumer_secret = os.environ['CONSUMER_SECRET']
oauth_token = os.environ['OAUTH_TOKEN']
oauth_token_secret = os.environ['OAUTH_TOKEN_SECRET']
self.sObj = Splitwise(consumer_key, consumer_secret)
self.sObj.setAccessToken({'oauth_token': oauth_token, 'oauth_token_secret': oauth_token_secret})
def setUp(self):
self.sObj = Splitwise('consumerkey', 'consumersecret')
def setUp(self):
self.sObj = Splitwise('consumerkey', 'consumersecret')
def setUp(self):
self.sObj = Splitwise('consumerkey', 'consumersecret')
def setUp(self):
self.sObj = Splitwise('consumerkey', 'consumersecret')
def setUp(self):
self.sObj = Splitwise('consumerkey', 'consumersecret')
def login():
sObj = Splitwise(Config.consumer_key, Config.consumer_secret)
url, secret = sObj.getAuthorizeURL()
session['secret'] = secret
return redirect(url)
def authorize():
if 'secret' not in session:
return redirect(url_for("home"))
oauth_token = request.args.get('oauth_token')
oauth_verifier = request.args.get('oauth_verifier')
sObj = Splitwise(Config.consumer_key, Config.consumer_secret)
access_token = sObj.getAccessToken(oauth_token, session['secret'], oauth_verifier)
session['access_token'] = access_token
return redirect(url_for("friends"))