mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Fix unspents endpoint
This commit is contained in:
parent
09cbba8886
commit
3922b2d4fa
@ -13,6 +13,7 @@ from bigchaindb import util
|
||||
from bigchaindb import Bigchain
|
||||
from bigchaindb.web.views.info import info_views
|
||||
from bigchaindb.web.views.transactions import transaction_views
|
||||
from bigchaindb.web.views.unspents import unspent_views
|
||||
|
||||
from bigchaindb.monitor import Monitor
|
||||
|
||||
@ -70,6 +71,7 @@ def create_app(*, debug=False, threads=4):
|
||||
|
||||
app.register_blueprint(info_views, url_prefix='/')
|
||||
app.register_blueprint(transaction_views, url_prefix='/api/v1')
|
||||
app.register_blueprint(unspent_views, url_prefix='/api/v1')
|
||||
return app
|
||||
|
||||
|
||||
|
@ -5,9 +5,9 @@ UNSPENTS_ENDPOINT = '/api/v1/unspents/'
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('inputs')
|
||||
def test_get_unspents_endpoint(b, client, user_vk):
|
||||
expected = [u.to_uri('..') for u in b.get_owned_ids(user_vk)]
|
||||
res = client.get(UNSPENTS_ENDPOINT + '?owner_after={}'.format(user_vk))
|
||||
def test_get_unspents_endpoint(b, client, user_pk):
|
||||
expected = [u.to_uri('..') for u in b.get_owned_ids(user_pk)]
|
||||
res = client.get(UNSPENTS_ENDPOINT + '?owner_after={}'.format(user_pk))
|
||||
assert expected == res.json
|
||||
assert res.status_code == 200
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user