GolosChain / golos-python

Official Python Library for Golos Blockchain
MIT License
3 stars 4 forks source link

[0.16.4] Failed tests #11

Open bitphage opened 6 years ago

bitphage commented 6 years ago
% PYTHONPATH=`pwd` pytest -v
...
tests/steem/test_post.py::test_post_refresh FAILED
tests/steem/test_steemd.py::test_ensured_block_ranges FAILED

test_post.py:

E           steembase.exceptions.PostDoesNotExist: Post does not exist: @steemitblog/marketing-w-mitchell-a-steem-ecosystem

tests/steem/test_steemd.py::test_ensured_block_ranges:

    def test_ensured_block_ranges():
        """ Post should load correctly if passed a dict or string identifier. """
        s = Steemd()
>       assert list(pluck('block_num', s.get_blocks_range(1000, 2000))) == list(range(1000, 2000))

tests/steem/test_steemd.py:8: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
steem/steemd.py:220: in get_blocks_range
    return self.get_blocks(list(range(start, end)))
steem/steemd.py:201: in get_blocks
    for block in self._get_blocks(missing):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

.0 = <generator object HttpClient.exec_multi_with_futures at 0x7f449bb6e1a8>

>   return ({**x, 'block_num': int(x['block_id'][:8], base=16)} for x in results if x)
E   KeyError: 'block_id'

steem/steemd.py:184: KeyError
bitphage commented 6 years ago

Golos doesn't have block_id field in block. So test_ensured_block_ranges should be disabled for now.