Example #1
0
 def setUp(self):
   super(RedditTest, self).setUp()
   oauth_dropins.reddit.REDDIT_APP_KEY = 'my_app_key'
   oauth_dropins.reddit.REDDIT_APP_SECRET = 'my_app_secret'
   self.handler.messages = []
   user = oauth_dropins.reddit.praw_to_user(gr_reddit_test.FakeRedditor())
   self.auth_entity = oauth_dropins.reddit.RedditAuth(
     id='my_string_id',
     refresh_token='silly_token',
     user_json=json_dumps(user))
   self.auth_entity.put()
   self.r = Reddit.new(self.handler, auth_entity=self.auth_entity)