# Path: oppy/stream/stream.py
# SENDME_THRESHOLD = 450
# STREAM_WINDOW_INIT = 500
# STREAM_WINDOW_SIZE = 50
#     LEN = MAX_RPAYLOAD_LEN
# class Stream(object):
#     def __init__(self, circuit_manager, request, socks):
#     def recv(self, data):
#     def send(self, data):
#     def incrementPackageWindow(self):
#     def streamConnected(self):
#     def closeFromCircuit(self):
#     def closeFromSOCKS(self):
#     def _registerNewStream(self, circuit):
#     def _pollWriteQueue(self):
#     def _pollReadQueue(self):
#     def _writeData(self, data):
#     def _recvData(self, data):
#     def _decDeliverWindow(self):
#     def _decPackageWindow(self):
# def _chunkRelayData(data):


import mock
from twisted.trial import unittest
from oppy.stream import stream




class StreamTest(unittest.TestCase):

    @mock.patch('oppy.circuit.circuitmanager.CircuitManager', autospec=True)
    @mock.patch('oppy.socks.socks.OppySOCKSProtocol', autospec=True)
    @mock.patch('oppy.util.exitrequest.ExitRequest', autospec=True)
    @mock.patch('twisted.internet.defer.DeferredQueue', autospec=True)
    def setUp(self, mock_dq, mock_er, mock_osp, mock_cm):
        self.mock_er = mock_er
        self.mock_osp = mock_osp
        self.mock_cm = mock_cm
        self.mock_dq = mock_dq

# Path: oppy/stream/stream.py
# SENDME_THRESHOLD = 450
# STREAM_WINDOW_INIT = 500
# STREAM_WINDOW_SIZE = 50
#     LEN = MAX_RPAYLOAD_LEN
# class Stream(object):
#     def __init__(self, circuit_manager, request, socks):
#     def recv(self, data):
#     def send(self, data):
#     def incrementPackageWindow(self):
#     def streamConnected(self):
#     def closeFromCircuit(self):
#     def closeFromSOCKS(self):
#     def _registerNewStream(self, circuit):
#     def _pollWriteQueue(self):
#     def _pollReadQueue(self):
#     def _writeData(self, data):
#     def _recvData(self, data):
#     def _decDeliverWindow(self):
#     def _decPackageWindow(self):
# def _chunkRelayData(data):


# Path: oppy/tests/unit/stream/test_stream.py
import mock
from twisted.trial import unittest
from oppy.stream import stream





class StreamTest(unittest.TestCase):

    @mock.patch('oppy.circuit.circuitmanager.CircuitManager', autospec=True)
    @mock.patch('oppy.socks.socks.OppySOCKSProtocol', autospec=True)
    @mock.patch('oppy.util.exitrequest.ExitRequest', autospec=True)
    @mock.patch('twisted.internet.defer.DeferredQueue', autospec=True)
    def setUp(self, mock_dq, mock_er, mock_osp, mock_cm):
        self.mock_er = mock_er
        self.mock_osp = mock_osp
        self.mock_cm = mock_cm
        self.mock_dq = mock_dq

        self.stream = stream.Stream(self.mock_cm, self.mock_er, self.mock_osp)