Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
timkpaine committed Aug 13, 2018
1 parent 156c96d commit ed47686
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ docs: ## make documentation
install: ## install to site-packages
python3 setup.py install

dist: ## dist to pypi
python3 setup.py sdist upload -r pypi

# Thanks to Francoise at marmelab.com for this
.DEFAULT_GOAL := help
help:
Expand All @@ -33,4 +36,4 @@ help:
print-%:
@echo '$*=$($*)'

.PHONY: clean test tests help annotate annotate_l docs
.PHONY: clean test tests help annotate annotate_l docs dist
14 changes: 7 additions & 7 deletions tests/test_stocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_companyDF(self):
with patch('requests.get') as mock:
mock.return_value = MagicMock()
mock.return_value.status_code = 200
mock.return_value.json = MagicMock(return_value={'test': {'test2': 4}})
mock.return_value.json = MagicMock(return_value={'test': [4], 'symbol': ['test']})
companyDF('test')

def test_quote(self):
Expand All @@ -48,7 +48,7 @@ def test_quoteDF(self):
with patch('requests.get') as mock:
mock.return_value = MagicMock()
mock.return_value.status_code = 200
mock.return_value.json = MagicMock(return_value={'test': {'test2': 4}})
mock.return_value.json = MagicMock(return_value={'test': [4], 'symbol': ['test']})
quoteDF('test')

def test_price(self):
Expand Down Expand Up @@ -108,7 +108,7 @@ def test_delayedQuoteDF(self):
with patch('requests.get') as mock:
mock.return_value = MagicMock()
mock.return_value.status_code = 200
mock.return_value.json = MagicMock(return_value=[])
mock.return_value.json = MagicMock(return_value=[{'symbol': 'test'}])
delayedQuoteDF('test')

def test_yesterday(self):
Expand Down Expand Up @@ -228,7 +228,7 @@ def test_earningsDF(self):
with patch('requests.get') as mock:
mock.return_value = MagicMock()
mock.return_value.status_code = 200
mock.return_value.json = MagicMock(return_value=[])
mock.return_value.json = MagicMock(return_value={'earnings': [{'EPSReportDate': 'test'}], 'symbol': 'test'})
earningsDF('test')

def test_peers(self):
Expand Down Expand Up @@ -280,7 +280,7 @@ def test_dividendsDF(self):
with patch('requests.get') as mock:
mock.return_value = MagicMock()
mock.return_value.status_code = 200
mock.return_value.json = MagicMock(return_value=[])
mock.return_value.json = MagicMock(return_value=[{'exDate': 'test'}])
dividendsDF('test')

def test_splits(self):
Expand Down Expand Up @@ -316,7 +316,7 @@ def test_newsDF(self):
with patch('requests.get') as mock:
mock.return_value = MagicMock()
mock.return_value.status_code = 200
mock.return_value.json = MagicMock(return_value=[])
mock.return_value.json = MagicMock(return_value=[{'datetime': 'test'}])
newsDF('test')

def test_marketNews(self):
Expand Down Expand Up @@ -354,7 +354,7 @@ def test_chartDF(self):
with patch('requests.get') as mock:
mock.return_value = MagicMock()
mock.return_value.status_code = 200
mock.return_value.json = MagicMock(return_value=[])
mock.return_value.json = MagicMock(return_value=[{'date': 'test'}])
chartDF('test')

def test_logo(symbol):
Expand Down

0 comments on commit ed47686

Please sign in to comment.