code: def test_update_on_single_exchange_with_single_order(
      mock_order_class, mock_exchange_class
  ):
      exchange = mock_exchange_class.return_value
      broker = Broker()
      broker.exchanges = [exchange]
  
      order = mock_order_class.return_value
      order.id = "fake_id"
      order.start = 0
      order.end = None
      order.is_executable_on = mock.Mock(side_effect=[False, True])
      order.attach = mock.Mock(return_value=None)
  
      broker.submit(order)
  
      # Test order does execute
      broker.update()
      assert order not in broker.unexecuted
      assert order.id in broker.executed
      order.attach.assert_called_once_with(broker)
  
file_path: tensortrade/tests/tensortrade/unit/oms/orders/test_broker.py
imports: import pytest
  import unittest.mock
  from decimal import Decimal
  from tensortrade.oms.orders import Broker, OrderStatus, Order, OrderSpec, TradeSide, TradeType
  from tensortrade.oms.orders.criteria import Stop
  from tensortrade.oms.wallets import Wallet, Portfolio
  from tensortrade.oms.instruments import USD, BTC, Quantity, ExchangePair
label_desc: Use image node_id 5 for calling a global function with example usage: test_update_on_single_exchange_with_single_order(mock_order_class, mock_exchange_class) without return types