Esempio n. 1
0
 def test_applicable(self):
   os.environ.update({
     'USER_EMAIL': '*****@*****.**',
     'USER_ID': '123',
     'USER_IS_ADMIN': '0',
   })
   # Actual request is not used by CookieAuthentication.
   self.assertEqual(
       model.Identity(model.IDENTITY_USER, '*****@*****.**'),
       handler.cookie_authentication(webapp2.Request({})))
Esempio n. 2
0
 def test_non_applicable(self):
   self.assertIsNone(handler.cookie_authentication(webapp2.Request({})))