docstr: create_order method
  tests the handling of a RequestTimeout exception and locating the
  order, if was created, using the fetchClosedOrders method
  :return:
docstr_tok: ["create_order","method","tests","the","handling","of","a","RequestTimeout","exception","and","locating","the","order",",","if","was","created",",","using","the","fetchClosedOrders","method",":","return",":"]
code: def test_create_order_timeout_closed(self):
      """
      create_order method
      tests the handling of a RequestTimeout exception and locating the
      order, if was created, using the fetchClosedOrders method
      :return:
      """
      asset = [
          pair
          for pair in self.exchange.assets
          if pair.symbol == "eth_usdt"
      ][0]
      amount = 2
      is_buy = True
      self.last_order = False
      price = 0.00254
  
      self.exchange.api = MagicMock(
          spec=[
              "create_order",
              "fetch_closed_orders",
              "orders",
              "has",
              "amount_to_precision",
          ]
      )
      self.exchange.api.create_order.side_effect = RequestTimeout
  
      orders_dict = self.create_orders_dict(asset, self.last_order)
      self.exchange.api.orders = orders_dict
      self.exchange.api.has = {
          "fetchOpenOrders": False,
          "fetchClosedOrders": True,
      }
      self.exchange.api.fetch_closed_orders.side_effect = (
          self.mod_last_order
      )
  
      mock_style = create_autospec(
          ExchangeLimitOrder, return_value=price
      )
      mock_style.get_limit_price.return_value = price
      style = mock_style
  
      self.exchange.api.amount_to_precision = Mock(
          return_value=float(amount)
      )
  
      with patch(
          "catalyst.exchange.ccxt.ccxt_exchange.CCXT.get_symbol"
      ) as mock_symbol:
          mock_symbol.return_value = "ETH/USDT"
          observed_fetchClosed_order = self.exchange.create_order(
              asset, amount, is_buy, style
          )
  
      expected_fetchClosed_order = Order(
          dt=pd.to_datetime("2018-05-01 19:54", utc=True),
          asset=asset,
          amount=amount,
          stop=None,
          limit=price,
          id="111",
      )
      assert (
          self.compare_orders(
              observed_fetchClosed_order, expected_fetchClosed_order
          )
          is True
      )
  
imports: from logbook import Logger
  from mock import patch, create_autospec, MagicMock, Mock
  import pandas
  from ccxt.base.errors import RequestTimeout
  from catalyst.exchange.exchange_errors import ExchangeRequestError
  from .base import BaseExchangeTestCase
  from catalyst.exchange.ccxt.ccxt_exchange import CCXT
  from catalyst.exchange.exchange_execution import ExchangeLimitOrder
  from catalyst.exchange.utils.exchange_utils import get_exchange_auth
  from catalyst.finance.order import Order
label_desc: Use image node_id 8 for calling the TestCCXT obj's underlying member method code with example usage: obj.test_create_order_timeout_closed() without return types