Commit ce412ce1 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Fix test with connector handler.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@442 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 6284c5ee
...@@ -22,9 +22,9 @@ from neo.node import Node, MasterNode, StorageNode, ClientNode, NodeManager ...@@ -22,9 +22,9 @@ from neo.node import Node, MasterNode, StorageNode, ClientNode, NodeManager
from time import time from time import time
from neo.connection import BaseConnection, ListeningConnection, Connection, \ from neo.connection import BaseConnection, ListeningConnection, Connection, \
ClientConnection, ServerConnection, MTClientConnection, MTServerConnection ClientConnection, ServerConnection, MTClientConnection, MTServerConnection
from neo.connector import getConnectorHandler from neo.connector import getConnectorHandler, registerConnectorHandler
from neo.handler import EventHandler from neo.handler import EventHandler
from neo.master.tests.connector import DoNothingConnector, SimpleConnector from neo.master.tests.connector import DoNothingConnector
from neo.connector import ConnectorTryAgainException, ConnectorInProgressException from neo.connector import ConnectorTryAgainException, ConnectorInProgressException
from neo.protocol import Packet, ProtocolError, PROTOCOL_ERROR_CODE, ERROR,INTERNAL_ERROR_CODE, \ from neo.protocol import Packet, ProtocolError, PROTOCOL_ERROR_CODE, ERROR,INTERNAL_ERROR_CODE, \
ANSWER_PRIMARY_MASTER ANSWER_PRIMARY_MASTER
...@@ -64,6 +64,7 @@ class testConnection(unittest.TestCase): ...@@ -64,6 +64,7 @@ class testConnection(unittest.TestCase):
self.assertEqual(bc.connector_handler, None) self.assertEqual(bc.connector_handler, None)
# init with connector but no handler # init with connector but no handler
registerConnectorHandler(DoNothingConnector)
connector = getConnectorHandler("DoNothingConnector")() connector = getConnectorHandler("DoNothingConnector")()
self.assertNotEqual(connector, None) self.assertNotEqual(connector, None)
em = Mock() em = Mock()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment