def test_flow_control_is_limited_by_connection(self):
        """
        The flow control window is limited by the flow control of the
        connection.
        """
        c = h2.connection.H2Connection()
        c.send_headers(1, self.example_request_headers)
        c.send_data(1, b'some data')
        c.send_headers(3, self.example_request_headers)

        remaining_length = self.DEFAULT_FLOW_WINDOW - len(b'some data')
        assert (c.local_flow_control_window(3) == remaining_length)
dataset/ETHPy150Open python-hyper/hyper-h2/test/test_flow_control_window.py/TestFlowControl.test_flow_control_is_limited_by_connection/original