From 64bcb9cc1d90a20b60c6e0f9ff8dc20732099ea9 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Tue, 6 Dec 2016 08:15:51 -0500 Subject: [PATCH] Fix the Options quotes not getting the right symbol --- metrik/flows/options_flow.py | 2 +- test/tasks/test_cboe.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/metrik/flows/options_flow.py b/metrik/flows/options_flow.py index 4121c71..1b08179 100644 --- a/metrik/flows/options_flow.py +++ b/metrik/flows/options_flow.py @@ -16,7 +16,7 @@ class OptionsFlow(Flow): live=self.live) yield optionable - options_quotes = [TradekingOptionsQuotes(symbol=s, + options_quotes = [TradekingOptionsQuotes(symbol=s['Stock Symbol'], current_datetime=self.present, live=self.live) for s in optionable.output().retrieve()['companies']] diff --git a/test/tasks/test_cboe.py b/test/tasks/test_cboe.py index 92b865f..7e40d33 100644 --- a/test/tasks/test_cboe.py +++ b/test/tasks/test_cboe.py @@ -7,4 +7,11 @@ class CboeTest(TestCase): def test_optionable_list(self): companies = CboeOptionableList.retrieve_data()['companies'] - assert len(companies) > 2000 \ No newline at end of file + assert len(companies) > 2000 + + + def test_optionable_list_format(self): + companies = CboeOptionableList.retrieve_data()['companies'] + symbols = [c['Stock Symbol'] for c in companies] + + assert 'AAPL' in symbols \ No newline at end of file