diff --git a/bigchaindb/web/server.py b/bigchaindb/web/server.py index 1756fffe..9cdbefc5 100644 --- a/bigchaindb/web/server.py +++ b/bigchaindb/web/server.py @@ -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. diff --git a/bigchaindb/web/views/transactions.py b/bigchaindb/web/views/transactions.py index babec6fc..b8bb327c 100644 --- a/bigchaindb/web/views/transactions.py +++ b/bigchaindb/web/views/transactions.py @@ -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': }``, where ```` - is one of "valid", "invalid", "undecided", "backlog". + A ``dict`` in the format ``{'status': }``, where + ```` 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: diff --git a/tests/web/test_server.py b/tests/web/test_server.py index 10720934..f6b7d918 100644 --- a/tests/web/test_server.py +++ b/tests/web/test_server.py @@ -1,4 +1,4 @@ -def test_settings(monkeypatch): +def test_settings(): import bigchaindb from bigchaindb.web import server