mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Notes, TODOs and formating
This commit is contained in:
parent
8e8bc90742
commit
09cbba8886
@ -17,6 +17,7 @@ from bigchaindb.web.views.transactions import transaction_views
|
||||
from bigchaindb.monitor import Monitor
|
||||
|
||||
|
||||
# TODO: Figure out if we do we need all this boilerplate.
|
||||
class StandaloneApplication(gunicorn.app.base.BaseApplication):
|
||||
"""Run a **wsgi** app wrapping it in a Gunicorn Base Application.
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
"""This module provides the blueprint for some basic API endpoints.
|
||||
|
||||
For more information please refer to the documentation on ReadTheDocs:
|
||||
- https://docs.bigchaindb.com/projects/server/en/latest/drivers-clients/http-client-server-api.html
|
||||
- https://docs.bigchaindb.com/projects/server/en/latest/drivers-clients/
|
||||
http-client-server-api.html
|
||||
"""
|
||||
from flask import current_app, request, Blueprint
|
||||
from flask_restful import Resource, Api
|
||||
@ -28,6 +29,7 @@ transaction_views = Blueprint('transaction_views', __name__)
|
||||
transaction_api = Api(transaction_views)
|
||||
|
||||
|
||||
# TODO: Do we really need this?
|
||||
# Unfortunately I cannot find a reference to this decorator.
|
||||
# This answer on SO is quite useful tho:
|
||||
# - http://stackoverflow.com/a/13432373/597097
|
||||
@ -78,8 +80,8 @@ class TransactionStatusApi(Resource):
|
||||
tx_id (str): the id of the transaction.
|
||||
|
||||
Return:
|
||||
A ``dict`` in the format ``{'status': <status>}``, where ``<status>``
|
||||
is one of "valid", "invalid", "undecided", "backlog".
|
||||
A ``dict`` in the format ``{'status': <status>}``, where
|
||||
``<status>`` is one of "valid", "invalid", "undecided", "backlog".
|
||||
"""
|
||||
|
||||
pool = current_app.config['bigchain_pool']
|
||||
@ -103,8 +105,8 @@ class TransactionListApi(Resource):
|
||||
pool = current_app.config['bigchain_pool']
|
||||
monitor = current_app.config['monitor']
|
||||
|
||||
# `force` will try to format the body of the POST request even if the `content-type` header is not
|
||||
# set to `application/json`
|
||||
# `force` will try to format the body of the POST request even if the
|
||||
# `content-type` header is not set to `application/json`
|
||||
tx = request.get_json(force=True)
|
||||
|
||||
try:
|
||||
|
@ -1,4 +1,4 @@
|
||||
def test_settings(monkeypatch):
|
||||
def test_settings():
|
||||
import bigchaindb
|
||||
from bigchaindb.web import server
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user