def accepted_cookies(request): """ Filter returns accepted cookies varnames. :: {{ request|accepted_cookies }} """ return [c.varname for c in get_accepted_cookies(request)]
def accepted_cookies(request): """ Filter returns accepted cookies varnames. :: {{ request|accepted_cookies }} """ return [c.varname for c in get_accepted_cookies(request)]
def test_get_accepted_cookies(self): cookie_str = dict_to_cookie_str( {"optional": self.cookie_group.get_version()}) self.request.COOKIES[settings.COOKIE_CONSENT_NAME] = cookie_str cookies = get_accepted_cookies(self.request) self.assertIn(self.cookie, cookies)