def setUp(self):
     # logger.debug("callback test case setup")
     self.request = factory.get('/callback',data={'next':'dummy'})
     test_user = User()
     test_user.username = '******'
     test_user.save()
     self.request.user = test_user
     assoc = UserAssociation()
     assoc.user = test_user
     assoc.token = 'facebooktokenstring'
     assoc.expires = datetime.datetime.now() + datetime.timedelta(1)
     assoc.save()
     self.token = OAuth20Token(assoc.token, 5555)
     self.access = OAuthAccess()
예제 #2
0
 def setUp(self):
     self.request = factory.get('/callback',data={'next':'dummy'})
     test_user = User()
     test_user.username = '******'
     test_user.email = '*****@*****.**'
     test_user.save()
     self.test_user = test_user
     self.anon_user = AnonymousUser()
     self.request.user = test_user
     assoc = UserAssociation()
     assoc.user = test_user
     assoc.token = 'facebooktokenstring'
     assoc.identifier = 'facebookid'
     assoc.expires = datetime.datetime.now() + datetime.timedelta(1)
     assoc.save()
     self.token = OAuth20Token(str(assoc.token), 5555)
     self.access = OAuthAccess()