rename populate_trends to populate_buy_trend. make it produce buy and buy_price columns

This commit is contained in:
Janne Sinivirta
2017-09-09 16:32:53 +03:00
parent 1bcd51d6e0
commit 2f3fd1de8a
2 changed files with 20 additions and 18 deletions

View File

@@ -1,7 +1,7 @@
# pragma pylint: disable=missing-docstring
import unittest
import arrow
from analyze import parse_ticker_dataframe
from analyze import parse_ticker_dataframe, populate_buy_trend, populate_indicators
RESULT_BITTREX = {
'success': True,
@@ -29,6 +29,10 @@ class TestAnalyze(unittest.TestCase):
'2017-08-30T10:40:00',
'2017-08-30T10:42:00'])
def test_3_populates_buy_trend(self):
dataframe = populate_buy_trend(populate_indicators(self.result))
self.assertTrue('buy' in dataframe.columns)
self.assertTrue('buy_price' in dataframe.columns)
if __name__ == '__main__':
unittest.main()