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
a060565a
Commit
a060565a
authored
7 years ago
by
Fabian Schuh
Browse files
Options
Downloads
Plain Diff
Merge branch 'SmileyChris-master' into develop
parents
26fa540c
8cd8d76d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bitshares/asset.py
+1
-1
1 addition, 1 deletion
bitshares/asset.py
requirements-test.txt
+1
-0
1 addition, 0 deletions
requirements-test.txt
tests/test_asset.py
+10
-0
10 additions, 0 deletions
tests/test_asset.py
with
12 additions
and
1 deletion
bitshares/asset.py
+
1
−
1
View file @
a060565a
...
@@ -133,7 +133,7 @@ class Asset(BlockchainObject):
...
@@ -133,7 +133,7 @@ class Asset(BlockchainObject):
@property
@property
def
calls
(
self
):
def
calls
(
self
):
return
self
.
get_call_
position
s
(
10
)
return
self
.
get_call_
order
s
(
10
)
def
get_call_orders
(
self
,
limit
=
100
):
def
get_call_orders
(
self
,
limit
=
100
):
from
.price
import
Price
from
.price
import
Price
...
...
This diff is collapsed.
Click to expand it.
requirements-test.txt
+
1
−
0
View file @
a060565a
...
@@ -4,5 +4,6 @@ scrypt==0.7.1
...
@@ -4,5 +4,6 @@ scrypt==0.7.1
Events==0.2.2
Events==0.2.2
pyyaml
pyyaml
pytest
pytest
pytest-mock
coverage
coverage
mock
mock
This diff is collapsed.
Click to expand it.
tests/test_asset.py
+
10
−
0
View file @
a060565a
...
@@ -37,3 +37,13 @@ class Testcases(unittest.TestCase):
...
@@ -37,3 +37,13 @@ class Testcases(unittest.TestCase):
self
.
assertEqual
(
asset
.
permissions
,
asset
[
"
permissions
"
])
self
.
assertEqual
(
asset
.
permissions
,
asset
[
"
permissions
"
])
self
.
assertIsInstance
(
asset
.
flags
,
dict
)
self
.
assertIsInstance
(
asset
.
flags
,
dict
)
self
.
assertEqual
(
asset
.
flags
,
asset
[
"
flags
"
])
self
.
assertEqual
(
asset
.
flags
,
asset
[
"
flags
"
])
"""
# Mocker comes from pytest-mock, providing an easy way to have patched objects
# for the life of the test.
def test_calls(mocker):
asset = Asset(
"
USD
"
, lazy=True, bitshares_instance=BitShares(offline=True))
method = mocker.patch.object(Asset,
'
get_call_orders
'
)
asset.calls
method.assert_called_with(10)
"""
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