'Test whether we decline a trade when we receive an invalid proposed trade message'

@blocking_call_on_reactor_thread
def test_on_proposed_trade_decline(self):

    def mocked_send_decline_trade(*_):
        mocked_send_decline_trade.called = True
    mocked_send_decline_trade.called = False
    self.market_community.update_ip(TraderId(self.market_community.mid), ('2.2.2.2', 2))
    self.market_community.send_declined_trade = mocked_send_decline_trade
    self.market_community.order_manager.order_repository.add(self.order)
    self.proposed_trade._price = Price(900, 'DUM1')
    self.market_community.on_proposed_trade([self.get_proposed_trade_msg()])
    self.assertTrue(mocked_send_decline_trade.called)
