# Path: oppy/cell/definitions.py
# CREATE2_CMD         = 10
# 
# PADDING_CMD         = 0
# 
# VPADDING_CMD        = 128
# 
# Path: oppy/connection/connection.py
# class Connection(Protocol):
#     def __init__(self, connection_manager, connection_task):
#     def send(self, cell):
#     def dataReceived(self, data):
#     def _recv(self, cell):
#     def addCircuit(self, circuit):
#     def closeConnection(self):
#     def connectionLost(self, reason):
#     def _destroyAllCircuits(self):
#     def removeCircuit(self, circuit):


import mock
from twisted.trial import unittest
from oppy.cell.definitions import (
    CREATE2_CMD,
    PADDING_CMD,
    VPADDING_CMD,
)
from oppy.connection import connection





class ConnectionTest(unittest.TestCase):

    @mock.patch('oppy.connection.connectionbuildtask.ConnectionBuildTask',
                autospec=True)
    @mock.patch('oppy.connection.connectionmanager.ConnectionManager',
                autospec=True)
    def setUp(self, cm, cbt):
        cbt.micro_status_entry = mock.Mock()
        self.cbt = cbt
        self.cm = cm

# Path: oppy/cell/definitions.py
# CREATE2_CMD         = 10
# 
# PADDING_CMD         = 0
# 
# VPADDING_CMD        = 128
# 
# Path: oppy/connection/connection.py
# class Connection(Protocol):
#     def __init__(self, connection_manager, connection_task):
#     def send(self, cell):
#     def dataReceived(self, data):
#     def _recv(self, cell):
#     def addCircuit(self, circuit):
#     def closeConnection(self):
#     def connectionLost(self, reason):
#     def _destroyAllCircuits(self):
#     def removeCircuit(self, circuit):


# Path: oppy/tests/unit/connection/test_connection.py
import mock
from twisted.trial import unittest
from oppy.cell.definitions import (
    CREATE2_CMD,
    PADDING_CMD,
    VPADDING_CMD,
)
from oppy.connection import connection






class ConnectionTest(unittest.TestCase):

    @mock.patch('oppy.connection.connectionbuildtask.ConnectionBuildTask',
                autospec=True)
    @mock.patch('oppy.connection.connectionmanager.ConnectionManager',
                autospec=True)
    def setUp(self, cm, cbt):
        cbt.micro_status_entry = mock.Mock()
        self.cbt = cbt
        self.cm = cm

        self.connection = connection.Connection(cm, cbt)