def test_merge_fail_on_no_signatures(self): entity = Entity() ref = Transaction() ref.counter = 0 ref.add_signer(entity) ref.from_address = entity other = Transaction() other.counter = 0 other.add_signer(entity) other.from_address = entity self.assertFalse(ref.merge_signatures(other))
def test_handling_of_invalid_signatures(self): entity = Entity() ref = Transaction() ref.counter = 0 ref.add_signer(entity) ref.from_address = entity other = Transaction() other.counter = 0 other.add_signer(entity) other.from_address = entity other.add_signature(entity, b'clearly invalid sig') self.assertFalse(ref.merge_signatures(other))