cic-internal-integration/apps/cic-cache/tests/test_cache.py

36 lines
593 B
Python
Raw Permalink Normal View History

2021-02-18 06:04:30 +01:00
# standard imports
import os
import datetime
import logging
import json
# external imports
2021-02-18 06:04:30 +01:00
import pytest
# local imports
from cic_cache import BloomCache
logg = logging.getLogger()
def test_cache(
init_database,
list_defaults,
list_actors,
list_tokens,
txs,
):
session = init_database
c = BloomCache(session)
b = c.load_transactions(0, 100)
assert b[0] == list_defaults['block'] - 1
c = BloomCache(session)
c.load_transactions_account(list_actors['alice'],0, 100)
assert b[0] == list_defaults['block'] - 1