def test_addCookieWithAllArgumentsUnicode(self):
        """
        L{http.Request.addCookie} adds a new cookie to be sent with the
        response. L{unicode} arguments are encoded using UTF-8.
        """
        expectedCookieValue = (
            b"foo=bar; Expires=Fri, 31 Dec 9999 23:59:59 GMT; "
            b"Domain=.example.com; Path=/; Max-Age=31536000; "
            b"Comment=test; Secure; HttpOnly")

        self._checkCookie(expectedCookieValue,
            u"foo", u"bar", expires=u"Fri, 31 Dec 9999 23:59:59 GMT",
            domain=u".example.com", path=u"/", max_age=u"31536000",
            comment=u"test", secure=True, httpOnly=True)

        L{http.Request.addCookie} adds a new cookie to be sent with the
        response. L{unicode} arguments are encoded using UTF-8.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_http.py