Skip to content

Commit

Permalink
rename analyze.py to exchange_helpers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vertti committed Jul 17, 2018
1 parent 4a26eb3 commit 85fd4dd
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion freqtrade/strategy/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from pandas import DataFrame

from freqtrade import constants
from freqtrade.analyze import parse_ticker_dataframe
from freqtrade.exchange.exchange_helpers import parse_ticker_dataframe
from freqtrade.exchange import Exchange
from freqtrade.persistence import Trade

Expand Down
6 changes: 2 additions & 4 deletions freqtrade/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
from telegram import Chat, Message, Update

from freqtrade import constants
from freqtrade.analyze import parse_ticker_dataframe
from freqtrade.exchange.exchange_helpers import parse_ticker_dataframe
from freqtrade.exchange import Exchange
from freqtrade.freqtradebot import FreqtradeBot

logging.getLogger('').setLevel(logging.INFO)


def log_has(line, logs):
# caplog mocker returns log as a tuple: ('freqtrade.analyze', logging.WARNING, 'foobar')
# caplog mocker returns log as a tuple: ('freqtrade.something', logging.WARNING, 'foobar')
# and we want to match line against foobar in the tuple
return reduce(lambda a, b: a or b,
filter(lambda x: x[2] == line, logs),
Expand Down Expand Up @@ -51,13 +51,11 @@ def get_patched_freqtradebot(mocker, config) -> FreqtradeBot:
"""
# mocker.patch('freqtrade.fiat_convert.Market', {'price_usd': 12345.0})
patch_coinmarketcap(mocker, {'price_usd': 12345.0})
# mocker.patch('freqtrade.freqtradebot.Analyze', MagicMock())
mocker.patch('freqtrade.freqtradebot.RPCManager', MagicMock())
mocker.patch('freqtrade.freqtradebot.persistence.init', MagicMock())
patch_exchange(mocker, None)
mocker.patch('freqtrade.freqtradebot.RPCManager._init', MagicMock())
mocker.patch('freqtrade.freqtradebot.RPCManager.send_msg', MagicMock())
# mocker.patch('freqtrade.freqtradebot.Analyze.get_signal', MagicMock())

return FreqtradeBot(config)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# pragma pylint: disable=missing-docstring, C0103

"""
Unit test file for analyse.py
Unit test file for exchange_helpers.py
"""

from freqtrade.analyze import parse_ticker_dataframe
from freqtrade.exchange.exchange_helpers import parse_ticker_dataframe


def test_dataframe_correct_length(result):
Expand Down
2 changes: 1 addition & 1 deletion freqtrade/tests/strategy/test_default_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
from pandas import DataFrame

from freqtrade.analyze import parse_ticker_dataframe
from freqtrade.exchange.exchange_helpers import parse_ticker_dataframe
from freqtrade.strategy.default_strategy import DefaultStrategy


Expand Down
2 changes: 1 addition & 1 deletion freqtrade/tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import datetime
from unittest.mock import MagicMock

from freqtrade.analyze import parse_ticker_dataframe
from freqtrade.exchange.exchange_helpers import parse_ticker_dataframe
from freqtrade.misc import (common_datearray, datesarray_to_datetimearray,
file_dump_json, format_ms_time, shorten_date)
from freqtrade.optimize.__init__ import load_tickerdata_file
Expand Down

0 comments on commit 85fd4dd

Please sign in to comment.