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

Clean import of test module (thanks to pylint).


git-svn-id: https://svn.erp5.org/repos/neo/trunk@1344 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent ef7eedd3
......@@ -23,7 +23,7 @@ from neo.client.app import Application
from neo.client.exception import NEOStorageError, NEOStorageNotFoundError, \
NEOStorageConflictError
from neo import protocol
from neo.protocol import *
from neo.protocol import INVALID_TID
from neo.util import makeChecksum
import neo.connection
......
......@@ -16,7 +16,6 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest
from neo import logging
import threading
from mock import Mock, ReturnValues
from neo.tests import NeoTestBase
......
......@@ -17,7 +17,6 @@
import unittest
from neo.tests.functional import NEOCluster, NEOFunctionalTest
from neo import protocol
class ClusterTests(NEOFunctionalTest):
......
......@@ -17,7 +17,6 @@
import os
import unittest
import tempfile
import transaction
import ZODB
......@@ -25,7 +24,6 @@ from ZODB.FileStorage import FileStorage
from Persistence import Persistent
from neo.tests.functional import NEOCluster, NEOFunctionalTest
from neo.client.Storage import Storage as NEOStorage
TREE_SIZE = 6
......
......@@ -15,13 +15,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
from time import sleep, time
import unittest
from neo.tests.functional import NEOCluster, NEOFunctionalTest
from neo.neoctl.neoctl import NotReadyException
from neo import protocol
from neo.protocol import NodeStates
from neo.util import dump
MASTER_NODE_COUNT = 3
......
......@@ -15,14 +15,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import ZODB
import unittest
import transaction
from Persistence import Persistent
from neo.tests.functional import NEOCluster, NEOFunctionalTest
from neo.client.Storage import Storage as NEOStorage
from neo import protocol
from neo.protocol import ClusterStates, NodeStates
class PObject(Persistent):
......
......@@ -15,7 +15,7 @@ import unittest
import ZODB
import ZODB.FileStorage
from ZODB.POSException import ReadConflictError, ConflictError
from ZODB.POSException import ReadConflictError
from ZODB.POSException import TransactionFailedError
from ZODB.tests.warnhook import WarningsHook
......
......@@ -15,18 +15,15 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import unittest
from neo import logging
from mock import Mock
from struct import pack, unpack
from neo.tests import NeoTestBase
import neo.master
from neo import protocol
from neo.protocol import Packet, PacketTypes, NodeTypes, NodeStates
from neo.master.handlers.client import ClientServiceHandler
from neo.master.app import Application
from neo.exception import OperationFailure, ElectionFailure
from neo.exception import OperationFailure
class MasterClientHandlerTests(NeoTestBase):
......
......@@ -15,17 +15,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import unittest
from neo import logging
from mock import Mock
from struct import pack, unpack
from neo.tests import NeoTestBase
from neo import protocol
from neo.protocol import Packet, PacketTypes, NodeTypes, NodeStates, INVALID_UUID
from neo.master.handlers.election import ClientElectionHandler, ServerElectionHandler
from neo.master.app import Application
from neo.exception import OperationFailure, ElectionFailure
from neo.exception import ElectionFailure
from neo.tests import DoNothingConnector
from neo.connection import ClientConnection
......
......@@ -15,12 +15,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest, logging, os
import unittest
from mock import Mock
from neo.tests import NeoTestBase
from neo.master.app import Application
from neo.protocol import INVALID_PTID, INVALID_OID, INVALID_TID, \
INVALID_UUID, Packet
from neo.storage.mysqldb import p64, u64
class MasterAppTests(NeoTestBase):
......
......@@ -15,11 +15,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest, os
import unittest
from mock import Mock
from neo.tests import NeoTestBase
from neo.protocol import NodeStates, CellStates
from neo.pt import Cell
from neo.master.pt import PartitionTable
from neo.node import StorageNode
......
......@@ -15,19 +15,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import unittest
from neo import logging
from mock import Mock
from struct import pack, unpack
from neo.tests import NeoTestBase
from neo.protocol import Packet, PacketTypes
from neo.protocol import NodeTypes, NodeStates, CellStates
from neo.master.handlers.recovery import RecoveryHandler
from neo.master.app import Application
from neo.exception import OperationFailure, ElectionFailure
from neo.tests import DoNothingConnector
from neo.connection import ClientConnection
class MasterRecoveryTests(NeoTestBase):
......
......@@ -15,19 +15,17 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import unittest
from neo import logging
from mock import Mock
from struct import pack, unpack
from neo.tests import NeoTestBase
import neo.master
from neo import protocol
from neo.protocol import Packet, PacketTypes
from neo.protocol import NodeTypes, NodeStates, CellStates
from neo.master.handlers.storage import StorageServiceHandler
from neo.master.app import Application
from neo.exception import OperationFailure, ElectionFailure
from neo.exception import OperationFailure
class MasterStorageHandlerTests(NeoTestBase):
......
......@@ -15,20 +15,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import unittest
from neo import logging
from mock import Mock
from struct import pack, unpack
import neo
from neo.tests import NeoTestBase
from neo.protocol import Packet, PacketTypes
from neo.protocol import NodeTypes, NodeStates, CellStates, ErrorCodes
from neo.protocol import NodeTypes, NodeStates, ErrorCodes
from neo.master.handlers.verification import VerificationHandler
from neo.master.app import Application
from neo.exception import OperationFailure, ElectionFailure, VerificationFailure
from neo.tests import DoNothingConnector
from neo.connection import ClientConnection
from neo.exception import VerificationFailure
class MasterVerificationTests(NeoTestBase):
......
......@@ -27,8 +27,8 @@ from neo.storage.handlers.client import TransactionInformation
from neo.storage.handlers.client import ClientOperationHandler
from neo.exception import PrimaryFailure, OperationFailure
from neo.pt import PartitionTable
from neo.protocol import *
from neo.protocol import PacketTypes
from neo.protocol import PacketTypes, Packet, INVALID_PARTITION
from neo.protocol import INVALID_TID, INVALID_OID, INVALID_SERIAL
class StorageClientHandlerTests(NeoTestBase):
......
......@@ -15,18 +15,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import unittest
from neo import logging
from mock import Mock
from neo.tests import NeoTestBase
from neo import protocol
from neo.pt import PartitionTable
from neo.storage.app import Application
from neo.storage.handlers.initialization import InitializationHandler
from neo.protocol import Packet, PacketTypes, CellStates
from neo.exception import PrimaryFailure, OperationFailure
from neo.storage.mysqldb import MySQLDatabaseManager, p64, u64
from neo.exception import PrimaryFailure
class StorageInitializationHandlerTests(NeoTestBase):
......
......@@ -26,8 +26,8 @@ from neo.storage.app import Application
from neo.storage.handlers.master import MasterOperationHandler
from neo.exception import PrimaryFailure, OperationFailure
from neo.pt import PartitionTable
from neo.protocol import CellStates, PacketTypes
from neo.protocol import *
from neo.protocol import CellStates, PacketTypes, Packet
from neo.protocol import INVALID_TID, INVALID_OID
class StorageMasterHandlerTests(NeoTestBase):
......
......@@ -15,13 +15,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest, logging, os
import unittest
from mock import Mock
from neo.tests import NeoTestBase
from neo.storage.app import Application
from neo.protocol import Packet, CellStates, PacketTypes, \
INVALID_PTID, INVALID_TID, INVALID_UUID
from neo.storage.mysqldb import p64, u64, MySQLDatabaseManager
from neo.protocol import CellStates
from collections import deque
from neo.pt import PartitionTable
from neo.util import dump
......
......@@ -24,8 +24,8 @@ from collections import deque
from neo.tests import NeoTestBase
from neo.storage.app import Application
from neo.storage.handlers.storage import StorageOperationHandler
from neo.protocol import *
from neo.protocol import PacketTypes
from neo.protocol import PacketTypes, Packet, INVALID_PARTITION
from neo.protocol import INVALID_TID, INVALID_OID, INVALID_SERIAL
class StorageStorageHandlerTests(NeoTestBase):
......
......@@ -21,8 +21,7 @@ from neo import logging
import MySQLdb
from mock import Mock
from neo.util import dump
from neo.protocol import *
from neo.protocol import CellStates
from neo.protocol import CellStates, INVALID_PTID
from neo.tests import NeoTestBase
from neo.exception import DatabaseFailure
from neo.storage.mysqldb import MySQLDatabaseManager, p64, u64
......
......@@ -15,18 +15,16 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import unittest
from neo import logging
from mock import Mock
from neo.tests import NeoTestBase
from neo.pt import PartitionTable
from neo.storage.app import Application
from neo.storage.handlers.verification import VerificationHandler
from neo.protocol import Packet, PacketTypes, CellStates, NodeTypes, ErrorCodes
from neo.protocol import Packet, PacketTypes, CellStates, ErrorCodes
from neo.protocol import INVALID_OID, INVALID_TID
from neo.exception import PrimaryFailure, OperationFailure
from neo.storage.mysqldb import MySQLDatabaseManager, p64, u64
from neo.storage.mysqldb import p64, u64
class StorageVerificationHandlerTests(NeoTestBase):
......
......@@ -15,12 +15,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import unittest
from neo import logging
from mock import Mock
from neo.tests import NeoTestBase
from neo.pt import PartitionTable
from neo.storage.app import Application
from neo.bootstrap import BootstrapManager
from neo.protocol import NodeTypes
......
......@@ -14,10 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest, os
import unittest
from mock import Mock
from neo import protocol
from time import time
from neo.connection import BaseConnection, ListeningConnection, Connection, \
ClientConnection, ServerConnection, MTClientConnection, MTServerConnection
from neo.connector import getConnectorHandler, registerConnectorHandler
......@@ -25,7 +23,7 @@ from neo.handler import EventHandler
from neo.tests import DoNothingConnector
from neo.connector import ConnectorException, ConnectorTryAgainException, \
ConnectorInProgressException, ConnectorConnectionRefusedException
from neo.protocol import Packet, ProtocolError, PacketTypes
from neo.protocol import PacketTypes
from neo import protocol
from neo.tests import NeoTestBase
......
......@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest, os
import unittest
from mock import Mock
from time import time
from neo.tests import NeoTestBase
......
......@@ -15,8 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest, os
from mock import Mock, ReturnValues
import unittest
from mock import Mock
from neo.tests import NeoTestBase
from neo.handler import EventHandler
from neo.protocol import UnexpectedPacketError
......
......@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest, os
import unittest
from mock import Mock
from neo.protocol import NodeStates, CellStates
from neo.pt import Cell, PartitionTable
......
......@@ -18,9 +18,9 @@
import unittest, os
from mock import Mock
from neo import protocol
from neo.protocol import *
from neo.protocol import NodeTypes, NodeStates, CellStates
from neo.protocol import ErrorCodes, PacketTypes
from neo.protocol import ErrorCodes, PacketTypes, Packet
from neo.protocol import INVALID_TID, PACKET_HEADER_SIZE
from neo.tests import NeoTestBase
from neo.util import getNextTID
from time import time, gmtime
......
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