Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/d/j/django-starter-box-0.1.0/djaccount/tests/models.py   django-starter-box(Download)
 
        fb_user = mock.facebook.get_user_from_cookie(cookies, app_id, app_secret)
        ext = Account.objects.fb_load_or_create(cookies=cookies, app_id=app_id, app_secret=app_secret)
 
        self.assertEqual(ext.account.first_name, mock.facebook.PROFILE['first_name'])
        self.assertFalse(ext.account.has_usable_password())
 
        ext2 = Account.objects.fb_load_or_create(cookies=cookies, app_id=app_id, app_secret=app_secret)
        self.assertEqual(ext2.pk, ext.pk)
 
        req.session = mock.Session()
 
        ext = Account.objects.fb_load_or_create(cookies=cookies, app_id=app_id, app_secret=app_secret)
 
        acc = Account.objects.login_external(request=req, service=ext.service, service_id=ext.service_id)
        self.acc.delete()
 
        ext = Account.objects.fb_load_or_create(cookies=cookies, app_id=app_id, app_secret=app_secret)
 
        exts = Account.objects.load_external(account=ext.account)

src/d/j/django-starter-box-HEAD/djaccount/tests/models.py   django-starter-box(Download)
 
        fb_user = mock.facebook.get_user_from_cookie(cookies, app_id, app_secret)
        ext = Account.objects.fb_load_or_create(cookies=cookies, app_id=app_id, app_secret=app_secret)
 
        self.assertEqual(ext.account.first_name, mock.facebook.PROFILE['first_name'])
        self.assertFalse(ext.account.has_usable_password())
 
        ext2 = Account.objects.fb_load_or_create(cookies=cookies, app_id=app_id, app_secret=app_secret)
        self.assertEqual(ext2.pk, ext.pk)
 
        req.session = mock.Session()
 
        ext = Account.objects.fb_load_or_create(cookies=cookies, app_id=app_id, app_secret=app_secret)
 
        acc = Account.objects.login_external(request=req, service=ext.service, service_id=ext.service_id)
        self.acc.delete()
 
        ext = Account.objects.fb_load_or_create(cookies=cookies, app_id=app_id, app_secret=app_secret)
 
        exts = Account.objects.load_external(account=ext.account)