def setUp(self): super(CronTest, self).setUp() oauth_dropins.appengine_config.FLICKR_APP_KEY = 'my_app_key' oauth_dropins.appengine_config.FLICKR_APP_SECRET = 'my_app_secret' flickr_auth = oauth_flickr.FlickrAuth( id='123@N00', user_json=json.dumps(test_flickr.PERSON_INFO), token_key='my_key', token_secret='my_secret') flickr_auth.put() self.flickr = Flickr.new(None, auth_entity=flickr_auth, features=['listen']) self.assertEquals( 'https://farm5.staticflickr.com/4068/buddyicons/[email protected]', self.flickr.picture)
def setUp(self): super(CronTest, self).setUp() oauth_dropins.appengine_config.FLICKR_APP_KEY = 'my_app_key' oauth_dropins.appengine_config.FLICKR_APP_SECRET = 'my_app_secret' oauth_dropins.appengine_config.TWITTER_APP_KEY = 'my_app_key' oauth_dropins.appengine_config.TWITTER_APP_SECRET = 'my_app_secret' flickr_auth = oauth_flickr.FlickrAuth( id='123@N00', user_json=json.dumps(test_flickr.PERSON_INFO), token_key='my_key', token_secret='my_secret') flickr_auth.put() self.flickr = Flickr.new(None, auth_entity=flickr_auth, features=['listen']) self.assertEquals( 'https://farm5.staticflickr.com/4068/buddyicons/[email protected]', self.flickr.picture)
def _setup_flickr(self): """Creates and test :class:`Flickr` entities.""" flickrs = [] for id, features in (('123@N00', ['listen']), ('456@N11', [])): info = copy.deepcopy(test_flickr.PERSON_INFO) info['person']['nsid'] = id flickr_auth = oauth_dropins.flickr.FlickrAuth( id=id, user_json=json_dumps(info), token_key='my_key', token_secret='my_secret') flickr_auth.put() flickr = Flickr.new(auth_entity=flickr_auth, features=features) flickr.put() flickrs.append(flickr) return flickrs