code: def check_expected_errors(self, test_method):
          
          f = lambda key, default=[]: getattr(test_method, key, default)
          expected_error_page = f(EXPECTED_ERROR_PAGE, default=None)
          allowed_error_pages = f(ALLOWED_ERROR_PAGES)
          expected_error_messages = f(EXPECTED_ERROR_MESSAGES)
          allowed_error_messages = f(ALLOWED_ERROR_MESSAGES)
          self.check_errors(
              expected_error_page,
              allowed_error_pages,
              expected_error_messages,
              allowed_error_messages,
          )
docs: This method is called after each test. It will read decorated
          informations and check if there are expected errors.
  
          You can set expected errors by decorators :py:func:`.expected_error_page`,
          :py:func:`.allowed_error_pages`, :py:func:`.expected_error_messages`,
          :py:func:`.allowed_error_messages` and :py:func:`.allowed_any_error_message`.