def test_cancel(self, mock_cancelling, mock_size_remaining):
        mock_size_remaining.return_value = 20
        self.order.bet_id = 123
        self.order.status = OrderStatus.EXECUTABLE
        with self.assertRaises(OrderUpdateError):
            self.order.cancel(12)

        self.mock_order_type.ORDER_TYPE = OrderTypes.LIMIT
        self.order.cancel(0.01)
        self.assertEqual(self.order.update_data, {"size_reduction": 0.01})
        mock_cancelling.assert_called_with()
        self.order.cancel()
        self.assertEqual(self.order.update_data, {"size_reduction": None})