Cleanup some code

after deepcode.ai suggestions
This commit is contained in:
Matthias
2019-07-14 20:05:28 +02:00
parent f0206a90b1
commit 4238ee090d
3 changed files with 9 additions and 6 deletions

View File

@@ -69,8 +69,8 @@ def test_load_strategy(result):
def test_load_strategy_base64(result):
with open("freqtrade/tests/strategy/test_strategy.py", "r") as file:
encoded_string = urlsafe_b64encode(file.read().encode("utf-8")).decode("utf-8")
with open("freqtrade/tests/strategy/test_strategy.py", "rb") as file:
encoded_string = urlsafe_b64encode(file.read()).decode("utf-8")
resolver = StrategyResolver({'strategy': 'TestStrategy:{}'.format(encoded_string)})
assert 'adx' in resolver.strategy.advise_indicators(result, {'pair': 'ETH/BTC'})

View File

@@ -13,4 +13,4 @@ def test_talib_bollingerbands_near_zero_values():
{'close': 0.00000014}
])
bollinger = ta.BBANDS(inputs, matype=0, timeperiod=2)
assert (bollinger['upperband'][3] != bollinger['middleband'][3])
assert bollinger['upperband'][3] != bollinger['middleband'][3]