def skip_if_bad_cookies(self):
        """
        cookies module fails to reject invalid cookies
        https://github.com/cherrypy/cherrypy/issues/1405
        """
        cookies = sys.modules.get('http.cookies')
        _is_legal_key = getattr(cookies, '_is_legal_key', lambda x: False)
        if not _is_legal_key(','):
            return
        issue = 'http://bugs.python.org/issue26302'
        tmpl = 'Broken cookies module ({issue})'
        self.skip(tmpl.format(**locals()))

        cookies module fails to reject invalid cookies
        https://github.com/cherrypy/cherrypy/issues/1405
        
cherrypy/test/test_core.py