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): ...@@ -97,7 +97,8 @@ class ClientApplicationTests(NeoTestBase):
makeTID = makeOID makeTID = makeOID
def makeTransactionObject(self, user='u', description='d', _extension='e'): def makeTransactionObject(self, user='u', description='d', _extension='e'):
class Transaction(object): pass class Transaction(object):
pass
txn = Transaction() txn = Transaction()
txn.user = user txn.user = user
txn.description = description txn.description = description
......
...@@ -48,35 +48,40 @@ class HandlerTests(NeoTestBase): ...@@ -48,35 +48,40 @@ class HandlerTests(NeoTestBase):
self.handler.dispatch(conn, packet) self.handler.dispatch(conn, packet)
# raise UnexpectedPacketError # raise UnexpectedPacketError
conn.mockCalledMethods = {} conn.mockCalledMethods = {}
def fake(c): raise UnexpectedPacketError('fake packet') def fake(c):
raise UnexpectedPacketError('fake packet')
self.setFakeMethod(fake) self.setFakeMethod(fake)
self.handler.dispatch(conn, packet) self.handler.dispatch(conn, packet)
self.checkErrorPacket(conn) self.checkErrorPacket(conn)
self.checkAborted(conn) self.checkAborted(conn)
# raise PacketMalformedError # raise PacketMalformedError
conn.mockCalledMethods = {} conn.mockCalledMethods = {}
def fake(c): raise PacketMalformedError('message') def fake(c):
raise PacketMalformedError('message')
self.setFakeMethod(fake) self.setFakeMethod(fake)
self.handler.dispatch(conn, packet) self.handler.dispatch(conn, packet)
self.checkErrorPacket(conn) self.checkErrorPacket(conn)
self.checkAborted(conn) self.checkAborted(conn)
# raise BrokenNodeDisallowedError # raise BrokenNodeDisallowedError
conn.mockCalledMethods = {} conn.mockCalledMethods = {}
def fake(c): raise BrokenNodeDisallowedError def fake(c):
raise BrokenNodeDisallowedError
self.setFakeMethod(fake) self.setFakeMethod(fake)
self.handler.dispatch(conn, packet) self.handler.dispatch(conn, packet)
self.checkErrorPacket(conn) self.checkErrorPacket(conn)
self.checkAborted(conn) self.checkAborted(conn)
# raise NotReadyError # raise NotReadyError
conn.mockCalledMethods = {} conn.mockCalledMethods = {}
def fake(c): raise NotReadyError def fake(c):
raise NotReadyError
self.setFakeMethod(fake) self.setFakeMethod(fake)
self.handler.dispatch(conn, packet) self.handler.dispatch(conn, packet)
self.checkErrorPacket(conn) self.checkErrorPacket(conn)
self.checkAborted(conn) self.checkAborted(conn)
# raise ProtocolError # raise ProtocolError
conn.mockCalledMethods = {} conn.mockCalledMethods = {}
def fake(c): raise ProtocolError def fake(c):
raise ProtocolError
self.setFakeMethod(fake) self.setFakeMethod(fake)
self.handler.dispatch(conn, packet) self.handler.dispatch(conn, packet)
self.checkErrorPacket(conn) 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