def test_sendSimplestRequest(self):
        """
        L{Request.writeTo} formats the request data and writes it to the given
        transport.
        """
        Request(b'GET', b'/', _boringHeaders, None).writeTo(self.transport)
        self.assertEqual(
            self.transport.value(),
            b"GET / HTTP/1.1\r\n"
            b"Connection: close\r\n"
            b"Host: example.com\r\n"
            b"\r\n")

        L{Request.writeTo} formats the request data and writes it to the given
        transport.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_newclient.py