Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
beem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
beem
Commits
9f00b3bf
Commit
9f00b3bf
authored
5 years ago
by
Holger
Browse files
Options
Downloads
Patches
Plain Diff
Fix unit test
parent
506cdc45
No related branches found
No related tags found
2 merge requests
!5
Taken current version of master branch in the https://github.com/holgern/beem
,
!4
Original changes pushed to master at https://github.com/holgern/beem
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/beem/test_nodelist.py
+15
-10
15 additions, 10 deletions
tests/beem/test_nodelist.py
with
15 additions
and
10 deletions
tests/beem/test_nodelist.py
+
15
−
10
View file @
9f00b3bf
...
...
@@ -4,8 +4,8 @@ from __future__ import print_function
from
__future__
import
unicode_literals
from
builtins
import
super
import
unittest
from
beem
import
Steem
,
exceptions
from
beem.instance
import
set_shared_
steem
_instance
from
beem
import
Steem
,
exceptions
,
Hive
from
beem.instance
import
set_shared_
blockchain
_instance
from
beem.account
import
Account
from
beem.nodelist
import
NodeList
...
...
@@ -14,12 +14,12 @@ class Testcases(unittest.TestCase):
@classmethod
def
setUpClass
(
cls
):
nodelist
=
NodeList
()
cls
.
bts
=
Steem
(
node
=
nodelist
.
get_nodes
(),
cls
.
bts
=
Hive
(
node
=
nodelist
.
get_
hive_
nodes
(),
nobroadcast
=
True
,
num_retries
=
10
)
set_shared_
steem
_instance
(
cls
.
bts
)
set_shared_
blockchain
_instance
(
cls
.
bts
)
def
test_get_nodes
(
self
):
nodelist
=
NodeList
()
...
...
@@ -33,7 +33,7 @@ class Testcases(unittest.TestCase):
nodelist
.
update_nodes
()
hive_nodes
=
nodelist
.
get_hive_nodes
()
for
node
in
hive_nodes
:
blockchainobject
=
Steem
(
node
=
node
)
blockchainobject
=
Hive
(
node
=
node
)
assert
blockchainobject
.
is_hive
def
test_steem_nodes
(
self
):
...
...
@@ -42,11 +42,16 @@ class Testcases(unittest.TestCase):
steem_nodes
=
nodelist
.
get_steem_nodes
()
for
node
in
steem_nodes
:
blockchainobject
=
Steem
(
node
=
node
)
assert
not
blockchainobject
.
is_
hive
assert
blockchainobject
.
is_
steem
def
test_nodes_update
(
self
):
nodelist
=
NodeList
()
all_nodes
=
nodelist
.
get_nodes
(
exclude_limited
=
False
,
dev
=
True
,
testnet
=
True
)
nodelist
.
update_nodes
(
steem
_instance
=
self
.
bts
)
nodes
=
nodelist
.
get_nodes
()
all_nodes
=
nodelist
.
get_
hive_
nodes
()
nodelist
.
update_nodes
(
blockchain
_instance
=
self
.
bts
)
nodes
=
nodelist
.
get_
hive_
nodes
()
self
.
assertIn
(
nodes
[
0
],
all_nodes
)
all_nodes
=
nodelist
.
get_steem_nodes
()
nodelist
.
update_nodes
(
blockchain_instance
=
self
.
bts
)
nodes
=
nodelist
.
get_steem_nodes
()
self
.
assertIn
(
nodes
[
0
],
all_nodes
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment