'Test the general check of the validity of a message in the market community'

@blocking_call_on_reactor_thread
def test_check_message(self):

    self.market_community.update_ip(TraderId(self.market_community.mid), ('2.2.2.2', 2))
    proposed_trade_msg = self.get_proposed_trade_msg()
    self.market_community.timeline.check = (lambda _: (True, None))
    [self.assertIsInstance(msg, Message.Implementation) for msg in self.market_community.check_message([proposed_trade_msg])]
    self.market_community.timeline.check = (lambda _: (False, None))
    [self.assertIsInstance(msg, DelayMessageByProof) for msg in self.market_community.check_message([proposed_trade_msg])]
