Commit 82e7d9f1 authored by Julien Muchembled's avatar Julien Muchembled

neo/tests/__init__.py: small cleanups

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2663 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent cf559958
......@@ -16,12 +16,12 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import sys
import random
import unittest
import socket
import sys
import tempfile
import unittest
import MySQLdb
import socket
import neo
from mock import Mock
......@@ -47,9 +47,8 @@ def buildUrlFromString(address):
try:
socket.inet_pton(socket.AF_INET6, address)
address = '[%s]' % address
except:
except Exception:
pass
return address
class NeoTestBase(unittest.TestCase):
......@@ -438,8 +437,9 @@ connector_cpt = 0
class DoNothingConnector(Mock):
def __init__(self, s=None):
neo.lib.logging.info("initializing connector")
self.desc = globals()['connector_cpt']
globals()['connector_cpt'] = globals()['connector_cpt']+ 1
global connector_cpt
self.desc = connector_cpt
connector_cpt += 1
self.packet_cpt = 0
Mock.__init__(self)
......
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