Skip to content
GitLab
Explore
Sign in
Register
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
aed33bcb
Commit
aed33bcb
authored
6 years ago
by
crokkon
Browse files
Options
Downloads
Patches
Plain Diff
adding basic Conveyor unittest
parent
35a89b8e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/beem/test_conveyor.py
+40
-0
40 additions, 0 deletions
tests/beem/test_conveyor.py
with
40 additions
and
0 deletions
tests/beem/test_conveyor.py
0 → 100644
+
40
−
0
View file @
aed33bcb
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
from
__future__
import
unicode_literals
import
unittest
from
beem
import
Steem
from
beem.conveyor
import
Conveyor
from
beem.instance
import
set_shared_steem_instance
from
beem.nodelist
import
NodeList
wif
=
'
5Jh1Gtu2j4Yi16TfhoDmg8Qj3ULcgRi7A49JXdfUUTVPkaFaRKz
'
class
Testcases
(
unittest
.
TestCase
):
@classmethod
def
setUpClass
(
cls
):
nodelist
=
NodeList
()
stm
=
Steem
(
node
=
nodelist
.
get_testnet
(),
nobroadcast
=
True
,
num_retries
=
10
,
expiration
=
120
,
keys
=
wif
)
set_shared_steem_instance
(
stm
)
def
test_healthcheck
(
self
):
health
=
Conveyor
().
healthcheck
()
self
.
assertTrue
(
'
version
'
in
health
)
self
.
assertTrue
(
'
ok
'
in
health
)
self
.
assertTrue
(
'
date
'
in
health
)
def
test_get_user_data
(
self
):
c
=
Conveyor
()
userdata
=
c
.
get_user_data
(
'
beem
'
)
self
.
assertTrue
(
'
jsonrpc
'
in
userdata
)
self
.
assertTrue
(
'
error
'
in
userdata
)
self
.
assertTrue
(
'
code
'
in
userdata
[
'
error
'
])
# error 401 -> unauthorized, but proper format
self
.
assertTrue
(
userdata
[
'
error
'
][
'
code
'
]
==
401
)
if
__name__
==
"
__main__
"
:
unittest
.
main
()
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