Created
December 2, 2013 15:57
-
-
Save sunglassatnight/7751680 to your computer and use it in GitHub Desktop.
foursquare auth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pingspot.dal.users import UserService | |
from sys import uuid | |
def test_foursquare_auth_token(dal, uniqueuser): | |
user = uniqueuser() | |
auth_token = str(uuid.uuid4()) | |
user.foursquare_auth_token = auth_token | |
saved_user = UserService.users.get_or_create_by_social_identifier(user) | |
assert user.foursquare_auth_token == auth_token | |
assert user.foursquare_auth_token == saved_user.foursquare_auth_token |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
UserService.users.get_or_create_by_social_identifier(user)
should actually bedal.users.get_or_create_by_social_identifier(user)
. However, as we discussed in chat, what we need here isdal.users.set_foursquare_auth_token(user, token)