Esempio n. 1
0
 def test_user(self):
     view = BaseView(self.context2, self.request)
     #users
     view.user
     view.User()
     view.UserName()
     view.Allowed("test", context=None)
     view.Allowed("test", context=self.context)
     view.InGroups([])
Esempio n. 2
0
 def test_cache(self):
     view = BaseView(self.context2, self.request)
     # header
     view.CacheHeader(Response(), user=None)
     view.NoCache(Response(), user=None)
     view.Modified(Response(), user=None)
     user = view.User()
     view.CacheHeader(Response(), user=user)
     view.NoCache(Response(), user=user)
     view.Modified(Response(), user=user)