Skip to content

Commit ff07566

Browse files
author
alistair
committed
Fix unit test as per issue #203
1 parent 9f7e502 commit ff07566

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/test_public_client.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import pytest
22
import gdax
33
import time
4+
import datetime
5+
from dateutil.relativedelta import relativedelta
46

57

68
@pytest.fixture(scope='module')
@@ -46,9 +48,11 @@ def test_get_product_trades(self, client):
4648
assert type(r) is list
4749
assert 'trade_id' in r[0]
4850

49-
@pytest.mark.parametrize('start', ('2017-11-01', None))
50-
@pytest.mark.parametrize('end', ('2017-11-30', None))
51-
@pytest.mark.parametrize('granularity', (3600, None))
51+
current_time = datetime.datetime.now()
52+
53+
@pytest.mark.parametrize('start,end,granularity',
54+
[(current_time - relativedelta(months=1),
55+
current_time, 10000)])
5256
def test_get_historic_rates(self, client, start, end, granularity):
5357
r = client.get_product_historic_rates('BTC-USD', start=start, end=end, granularity=granularity)
5458
assert type(r) is list

0 commit comments

Comments
 (0)