def test_replace(self, mock_replacing):
        self.order.bet_id = 123
        self.order.status = OrderStatus.EXECUTABLE
        with self.assertRaises(OrderUpdateError):
            self.order.replace(1.01)

        self.mock_order_type.ORDER_TYPE = OrderTypes.LIMIT
        self.mock_order_type.price = 2.02
        self.order.replace(1.01)
        self.assertEqual(self.order.update_data, {"new_price": 1.01})
        mock_replacing.assert_called_with()

        with self.assertRaises(OrderUpdateError):
            self.order.replace(2.02)