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