def test_get_time_utc():
    from spool.spoolex import BlockchainSpider, TIME_FORMAT
    time = '2016-06-13T17:28:03 UTC'
    timestamp = BlockchainSpider._get_time_utc(time)
    assert timestamp
    assert (datetime.fromtimestamp(timestamp, tz=pytz.UTC).strftime(TIME_FORMAT) == time)
def test_get_time_utc():
    from spool.spoolex import BlockchainSpider, TIME_FORMAT
    time = '2016-06-13T17:28:03 UTC'
    timestamp = BlockchainSpider._get_time_utc(time)
    assert timestamp
    assert (datetime.fromtimestamp(timestamp, tz=pytz.UTC).strftime(TIME_FORMAT) == time)