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
e8b3bdcd
Commit
e8b3bdcd
authored
6 years ago
by
Holger Nahrstaedt
Browse files
Options
Downloads
Patches
Plain Diff
Fix steemconnect unit test; prepare release 0.19.34
parent
eddab42a
No related branches found
Branches containing commit
Tags
0.19.34
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.rst
+7
-0
7 additions, 0 deletions
README.rst
tests/beem/test_steemconnect.py
+20
-9
20 additions, 9 deletions
tests/beem/test_steemconnect.py
with
27 additions
and
9 deletions
README.rst
+
7
−
0
View file @
e8b3bdcd
...
...
@@ -138,6 +138,13 @@ before transmitting the packed file. Please check the hash-sum after downloading
Changelog
=========
0.19.34
-------
* Several bug fixes (including issue #17)
* missing steem_instance fixed
* update_account_profile fixed
* update_account_metadata added
0.19.33
-------
* Several bug fixes (including issue #13 and #16)
...
...
This diff is collapsed.
Click to expand it.
tests/beem/test_steemconnect.py
+
20
−
9
View file @
e8b3bdcd
...
...
@@ -10,7 +10,6 @@ import unittest
from
parameterized
import
parameterized
import
random
import
json
from
six
import
PY2
from
pprint
import
pprint
from
beem
import
Steem
,
exceptions
from
beem.amount
import
Amount
...
...
@@ -65,10 +64,16 @@ class Testcases(unittest.TestCase):
"
test1
"
,
1.000
,
"
STEEM
"
,
memo
=
"
test
"
)
sc2
=
SteemConnect
(
steem_instance
=
bts
)
url
=
sc2
.
url_from_tx
(
tx
)
if
PY2
:
self
.
assertEqual
(
url
,
'
https://v2.steemconnect.com/sign/transfer?from=test&memo=test&to=test1&amount=1.000+STEEM
'
)
else
:
self
.
assertEqual
(
url
,
'
https://v2.steemconnect.com/sign/transfer?from=test&to=test1&amount=1.000+STEEM&memo=test
'
)
url_test
=
'
https://v2.steemconnect.com/sign/transfer?from=test&to=test1&amount=1.000+STEEM&memo=test
'
self
.
assertEqual
(
len
(
url
),
len
(
url_test
))
self
.
assertEqual
(
len
(
url
.
split
(
'
?
'
)),
2
)
self
.
assertEqual
(
url
.
split
(
'
?
'
)[
0
],
url_test
.
split
(
'
?
'
)[
0
])
url_parts
=
(
url
.
split
(
'
?
'
)[
1
]).
split
(
'
&
'
)
url_test_parts
=
(
url_test
.
split
(
'
?
'
)[
1
]).
split
(
'
&
'
)
self
.
assertEqual
(
len
(
url_parts
),
4
)
self
.
assertEqual
(
len
(
list
(
set
(
url_parts
).
intersection
(
set
(
url_test_parts
)))),
4
)
@parameterized.expand
([
(
"
non_appbase
"
),
...
...
@@ -81,7 +86,13 @@ class Testcases(unittest.TestCase):
bts
=
self
.
appbase
sc2
=
SteemConnect
(
steem_instance
=
bts
)
url
=
sc2
.
get_login_url
(
"
localhost
"
,
scope
=
"
login,vote
"
)
if
PY2
:
self
.
assertEqual
(
url
,
'
https://v2.steemconnect.com/oauth2/authorize?client_id=None&scope=login,vote&redirect_uri=localhost
'
)
else
:
self
.
assertEqual
(
url
,
'
https://v2.steemconnect.com/oauth2/authorize?client_id=None&redirect_uri=localhost&scope=login,vote
'
)
url_test
=
'
https://v2.steemconnect.com/oauth2/authorize?client_id=None&redirect_uri=localhost&scope=login,vote
'
self
.
assertEqual
(
len
(
url
),
len
(
url_test
))
self
.
assertEqual
(
len
(
url
.
split
(
'
?
'
)),
2
)
self
.
assertEqual
(
url
.
split
(
'
?
'
)[
0
],
url_test
.
split
(
'
?
'
)[
0
])
url_parts
=
(
url
.
split
(
'
?
'
)[
1
]).
split
(
'
&
'
)
url_test_parts
=
(
url_test
.
split
(
'
?
'
)[
1
]).
split
(
'
&
'
)
self
.
assertEqual
(
len
(
url_parts
),
3
)
self
.
assertEqual
(
len
(
list
(
set
(
url_parts
).
intersection
(
set
(
url_test_parts
)))),
3
)
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