Skip to content
Snippets Groups Projects
Commit c8ae430f authored by Holger's avatar Holger
Browse files

Add information about HIVE in the documentation

fix more unit tests
parent 3b11666e
No related branches found
No related tags found
2 merge requests!5Taken current version of master branch in the https://github.com/holgern/beem,!4Original changes pushed to master at https://github.com/holgern/beem
......@@ -8,6 +8,7 @@ Changelog
* Fix several unit tests
* Fix deprecated collections import
* Fix more HIVE/HBD symbols in beempy for HIVE
* Add information about HIVE in the documentation
0.22.10
-------
......
......@@ -17,18 +17,18 @@
Welcome to beem's documentation!
================================
Steem is a blockchain-based rewards platform for publishers to monetize
Steem/Hive is a blockchain-based rewards platform for publishers to monetize
content and grow community.
It is based on *Graphene* (tm), a blockchain technology stack (i.e.
software) that allows for fast transactions and ascalable blockchain
solution. In case of Steem, it comes with decentralized publishing of
solution. In case of Steem/Hive, it comes with decentralized publishing of
content.
The beem library has been designed to allow developers to easily
access its routines and make use of the network without dealing with all
the related blockchain technology and cryptography. This library can be
used to do anything that is allowed according to the Steem
used to do anything that is allowed according to the Steem/Hive
blockchain protocol.
......
Quickstart
==========
Hive/Steem blockchain
---------------------
Nodes for using beem with the Hive blockchain can be set by the command line tool with:
.. code-block:: bash
beempy updatenodes --hive
Nodes for the Steem blockchain are set with
.. code-block:: bash
beempy updatenodes
Hive nodes can be set in a python script with
.. code-block:: python
from beem import Steem
from beem.nodelist import NodeList
nodelist = NodeList()
nodelist.update_nodes()
nodes = nodelist.get_nodes(hive=True)
hive = Steem(node=nodes)
print(hive.is_hive)
Steem nodes can be set in a python script with
.. code-block:: python
from beem import Steem
from beem.nodelist import NodeList
nodelist = NodeList()
nodelist.update_nodes()
nodes = nodelist.get_nodes(hive=False)
hive = Steem(node=nodes)
print(hive.is_hive)
Steem
-----
The steem object is the connection to the Steem blockchain.
The steem object is the connection to the Steem/Hive blockchain.
By creating this object different options can be set.
.. note:: All init methods of beem classes can be given
......
......@@ -410,7 +410,7 @@ class Testcases(unittest.TestCase):
account_name = "fullnodeupdate"
result = runner.invoke(cli, ['pending', account_name])
self.assertEqual(result.exit_code, 0)
result = runner.invoke(cli, ['pending', '--post', '--comment', '--curation', account_name])
result = runner.invoke(cli, ['pending', '--post', '--comment', account_name])
self.assertEqual(result.exit_code, 0)
result = runner.invoke(cli, ['pending', '--post', '--comment', '--curation', '--permlink', '--days', '1', account_name])
self.assertEqual(result.exit_code, 0)
......
......@@ -21,8 +21,8 @@ class Testcases(unittest.TestCase):
@classmethod
def setUpClass(cls):
nodelist = NodeList()
nodelist.update_nodes(steem_instance=Steem(node=nodelist.get_nodes(exclude_limited=False), num_retries=10))
node_list = nodelist.get_nodes(exclude_limited=True)
nodelist.update_nodes(steem_instance=Steem(node=nodelist.get_nodes(hive=True), num_retries=10))
node_list = nodelist.get_nodes(hive=True)
cls.bts = Steem(
node=node_list,
......@@ -39,8 +39,8 @@ class Testcases(unittest.TestCase):
keys={"active": wif},
num_retries=10
)
acc = Account("holger80", steem_instance=cls.bts)
comment = acc.get_feed(limit=20)[-1]
acc = Account("fullnodeupdate", steem_instance=cls.bts)
comment = Comment(acc.get_blog_entries(limit=5)[-1], steem_instance=cls.bts)
cls.authorperm = comment.authorperm
[author, permlink] = resolve_authorperm(cls.authorperm)
cls.author = author
......
......@@ -35,11 +35,12 @@ class Testcases(unittest.TestCase):
set_shared_steem_instance(cls.bts)
cls.bts.set_default_account("test")
acc = Account("holger80", steem_instance=cls.bts)
acc = Account("fullnodeupdate", steem_instance=cls.bts)
n_votes = 0
index = 0
entries = acc.get_blog_entries(limit=30)[::-1]
while n_votes == 0:
comment = acc.get_feed(limit=30)[::-1][index]
comment = Comment(entries[index], steem_instance=cls.bts)
votes = comment.get_votes()
n_votes = len(votes)
index += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment