예제 #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({})))
예제 #2
0
 def test_non_applicable(self):
   self.assertIsNone(handler.cookie_authentication(webapp2.Request({})))