Skip to content

Instantly share code, notes, and snippets.

@six8
Forked from sunglassatnight/test_users.py
Last active December 30, 2015 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save six8/7753342 to your computer and use it in GitHub Desktop.
Save six8/7753342 to your computer and use it in GitHub Desktop.
from pingspot.dal.users import UserService
import uuid
def test_foursquare_auth_token(dal, uniqueuser):
user = uniqueuser()
auth_token = str(uuid.uuid4())
# No need to return anything, an error will be raised if something went wrong
dal.users.set_foursquare_auth_token(user, auth_token)
saved_user = dal.users.get(user.id)
assert saved_user.foursquare_auth_token == auth_token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment