Add metadata endpoint to info view

- Metadata search was recently added and works seamlessly
- The endpoint was not reflected in the info view i.e.
  when someone queries at root / or api/v1 endpoints.
- Handle unit tests for the change as well.
This commit is contained in:
muawiakh 2017-11-22 18:31:35 +01:00
parent dd24bd8fb7
commit 82cd3a61ed
2 changed files with 4 additions and 1 deletions

View File

@ -50,5 +50,6 @@ def get_api_v1_info(api_prefix):
'statuses': '{}statuses/'.format(api_prefix),
'assets': '{}assets/'.format(api_prefix),
'outputs': '{}outputs/'.format(api_prefix),
'streams': websocket_root
'streams': websocket_root,
'metadata': '{}metadata/'.format(api_prefix),
}

View File

@ -18,6 +18,7 @@ def test_api_root_endpoint(client, wsserver_base_url):
'outputs': '/api/v1/outputs/',
'streams': '{}/api/v1/streams/valid_transactions'.format(
wsserver_base_url),
"metadata": "/api/v1/metadata/"
}
},
'docs': 'https://docs.bigchaindb.com/projects/server/en/vtsttst/',
@ -41,6 +42,7 @@ def test_api_v1_endpoint(client, wsserver_base_url):
'outputs': '/outputs/',
'streams': '{}/api/v1/streams/valid_transactions'.format(
wsserver_base_url),
"metadata": "/metadata/"
}
res = client.get('/api/v1')
assert res.json == api_v1_info