Skip to content

Commit

Permalink
Ensure times that fall on a candle are also shifted
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Oct 27, 2020
1 parent 09af776 commit 69e8da3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/exchange/test_exchange.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import copy
import logging
from datetime import datetime, timezone
from datetime import datetime, timedelta, timezone
from random import randint
from unittest.mock import MagicMock, Mock, PropertyMock, patch

Expand Down Expand Up @@ -2300,6 +2300,9 @@ def test_timeframe_to_next_date():
date = datetime.now(tz=timezone.utc)
assert timeframe_to_next_date("5m") > date

date = datetime(2019, 8, 12, 13, 30, 0, tzinfo=timezone.utc)
assert timeframe_to_next_date("5m", date) == date + timedelta(minutes=5)


@pytest.mark.parametrize("market_symbol,base,quote,exchange,add_dict,expected_result", [
("BTC/USDT", 'BTC', 'USDT', "binance", {}, True),
Expand Down

0 comments on commit 69e8da3

Please sign in to comment.