'Test whether we accept a trade when we receive a correct proposed trade message'

@blocking_call_on_reactor_thread
def test_on_proposed_trade_accept(self):

    def mocked_start_transaction(*_):
        mocked_start_transaction.called = True
    mocked_start_transaction.called = False
    self.market_community.update_ip(TraderId(self.market_community.mid), ('2.2.2.2', 2))
    self.market_community.start_transaction = mocked_start_transaction
    self.market_community.order_manager.order_repository.add(self.order)
    self.market_community.on_proposed_trade([self.get_proposed_trade_msg()])
    self.assertTrue(mocked_start_transaction.called)
