Skip to content
Snippets Groups Projects
Commit a060565a authored by Fabian Schuh's avatar Fabian Schuh
Browse files

Merge branch 'SmileyChris-master' into develop

parents 26fa540c 8cd8d76d
No related branches found
No related tags found
No related merge requests found
...@@ -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_positions(10) return self.get_call_orders(10)
def get_call_orders(self, limit=100): def get_call_orders(self, limit=100):
from .price import Price from .price import Price
......
...@@ -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
...@@ -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)
"""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment