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

No more than one statement per line.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1844 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 159cb233
......@@ -97,7 +97,8 @@ class ClientApplicationTests(NeoTestBase):
makeTID = makeOID
def makeTransactionObject(self, user='u', description='d', _extension='e'):
class Transaction(object): pass
class Transaction(object):
pass
txn = Transaction()
txn.user = user
txn.description = description
......
......@@ -48,35 +48,40 @@ class HandlerTests(NeoTestBase):
self.handler.dispatch(conn, packet)
# raise UnexpectedPacketError
conn.mockCalledMethods = {}
def fake(c): raise UnexpectedPacketError('fake packet')
def fake(c):
raise UnexpectedPacketError('fake packet')
self.setFakeMethod(fake)
self.handler.dispatch(conn, packet)
self.checkErrorPacket(conn)
self.checkAborted(conn)
# raise PacketMalformedError
conn.mockCalledMethods = {}
def fake(c): raise PacketMalformedError('message')
def fake(c):
raise PacketMalformedError('message')
self.setFakeMethod(fake)
self.handler.dispatch(conn, packet)
self.checkErrorPacket(conn)
self.checkAborted(conn)
# raise BrokenNodeDisallowedError
conn.mockCalledMethods = {}
def fake(c): raise BrokenNodeDisallowedError
def fake(c):
raise BrokenNodeDisallowedError
self.setFakeMethod(fake)
self.handler.dispatch(conn, packet)
self.checkErrorPacket(conn)
self.checkAborted(conn)
# raise NotReadyError
conn.mockCalledMethods = {}
def fake(c): raise NotReadyError
def fake(c):
raise NotReadyError
self.setFakeMethod(fake)
self.handler.dispatch(conn, packet)
self.checkErrorPacket(conn)
self.checkAborted(conn)
# raise ProtocolError
conn.mockCalledMethods = {}
def fake(c): raise ProtocolError
def fake(c):
raise ProtocolError
self.setFakeMethod(fake)
self.handler.dispatch(conn, packet)
self.checkErrorPacket(conn)
......
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