old_contents: #!/usr/bin/env python
  # -*- coding: utf-8 -*-
  
  """
  test_stockfighter
  ----------------------------------
  
  Tests for `stockfighter` module.
  """
  import os
  import pytest
  from stockfighter.stockfighter import Stockfighter
  
  @pytest.fixture
  def client():
      return Stockfighter(
          venue='TESTEX',
          account='EXB123456',
      )
  STOCK = 'FOOBAR'
  
  
  def test_heartbeat(client):
      assert client.heartbeat() is True
  
  def test_venue_healthcheck(client):
      assert client.venue_healthcheck() is True
  
  def test_venue_stocks(client):
      assert client.venue_stocks()
  
  def test_orderbook_for_stock(client):
      assert client.orderbook_for_stock(STOCK)
  
  def test_place_new_order(client):
      assert client.place_new_order(
          stock=STOCK,
          price=500,  # Ignored for this market type
          qty=10,
          direction='buy',
          order_type='market',
      )
  
  def test_quote_for_stock(client):
      assert client.quote_for_stock(stock=STOCK)
  
new_contents: #!/usr/bin/env python
  # -*- coding: utf-8 -*-
  
  """
  test_stockfighter
  ----------------------------------
  
  Tests for `stockfighter` module.
  """
  import os
  import pytest
  from stockfighter.stockfighter import Stockfighter
  
  @pytest.fixture
  def client():
      return Stockfighter(
          venue='TESTEX',
          account='EXB123456',
      )
  STOCK = 'FOOBAR'
  
  
  def test_heartbeat(client):
      assert client.heartbeat() is True
  
  def test_venue_healthcheck(client):
      assert client.venue_healthcheck() is True
  
  def test_venue_stocks(client):
      assert client.venue_stocks()
  
  def test_orderbook_for_stock(client):
      assert client.orderbook_for_stock(STOCK)
  
  def test_place_new_order(client):
      assert client.place_new_order(
          stock=STOCK,
          price=500,  # Ignored for this market type
          qty=10,
          direction='buy',
          order_type='market',
      )
  
  def test_quote_for_stock(client):
      assert client.quote_for_stock(stock=STOCK)
  
  def test_readme():
      """Test the content of the README works as advertised."""
      from stockfighter import Stockfighter
      s = Stockfighter(venue='TESTEX', account='EXB123456')
      print s.venue_stocks()
  
subject: Test README quickstart