<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_context_data(self, **kwargs):
 """Tests cookies. """

        self.request.session.set_test_cookie()
        if not self.request.session.test_cookie_worked():
            messages.add_message(
                self.request, messages.ERROR, "Please enable cookies.")
        self.request.session.delete_test_cookie()
        return super().get_context_data(**kwargs)