From 9f3efd2a6a366d392a182d69824096abec8721d4 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 12 Feb 2018 10:35:54 -0500 Subject: [PATCH] Import client for now until we make a proper shim --- piker/testing/_quote_streamer.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/piker/testing/_quote_streamer.py b/piker/testing/_quote_streamer.py index 109f15de..719bbe44 100644 --- a/piker/testing/_quote_streamer.py +++ b/piker/testing/_quote_streamer.py @@ -6,13 +6,17 @@ import json from os import path import trio from async_generator import asynccontextmanager +from ..brokers import questrade +from ..calc import percent_change -@asynccontextmanager -async def get_client() -> None: - """Shim client factory. - """ - yield None +get_client = questrade.get_client + +# @asynccontextmanager +# async def get_client() -> None: +# """Shim client factory. +# """ +# yield None async def poll_tickers( @@ -23,7 +27,6 @@ async def poll_tickers( content = quotes_file.read() pkts = content.split('--') # simulate 2 separate quote packets - # import pdb; pdb.set_trace() payloads = [json.loads(pkt)['quotes'] for pkt in pkts] for payload in cycle(payloads):