-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
This test in test_remotenodeprocessor.py was formerly:
def testNewNodeSeen(self) :
self.node21.state = Node.State.Initialized
msg = Message(MTI.New_Node_Seen, NodeID(21), [])
self.processor.process(msg, self.node21)and I changed [] to bytearray()
but adding type checking to the constructor showed that the
test was wrong. What should it actually be?
The 3rd argument should be a destination node, and the last (optional) argument should be data.
For now I changed it to:
def testNewNodeSeen(self) :
self.node21.state = Node.State.Initialized
msg = Message(MTI.New_Node_Seen, NodeID(21), NodeID(0), data=bytearray())
self.processor.process(msg, self.node21)The test passes now, but please let me know if any further changes are necessary.
It passed before because:
- The argument wasn't checked for validity in the Message constructor.
- The destination is never used in the test (Is that ok in this case?)
Metadata
Metadata
Assignees
Labels
No labels