Fix flake8 errors

This commit is contained in:
Sylvain Bellemare 2017-11-27 16:22:33 +01:00
parent 7bfc665638
commit 35012a6452
3 changed files with 7 additions and 7 deletions

View File

@ -529,7 +529,7 @@ def test_get_assets():
assert list(cursor.sort('id', pymongo.ASCENDING)) == assets[::2]
@pytest.mark.parametrize("table", ['assets', 'metadata'])
@pytest.mark.parametrize('table', ['assets', 'metadata'])
def test_text_search(table):
from bigchaindb.backend import connect, query
conn = connect()

View File

@ -18,7 +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/"
'metadata': '/api/v1/metadata/',
}
},
'docs': 'https://docs.bigchaindb.com/projects/server/en/vtsttst/',
@ -42,7 +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/"
'metadata': '/metadata/',
}
res = client.get('/api/v1')
assert res.json == api_v1_info

View File

@ -47,8 +47,8 @@ def test_post_create_transaction_endpoint(b, client):
assert res.json['outputs'][0]['public_keys'][0] == user_pub
@pytest.mark.parametrize("nested", [False, True])
@pytest.mark.parametrize("language,expected_status_code", [
@pytest.mark.parametrize('nested', [False, True])
@pytest.mark.parametrize('language,expected_status_code', [
('danish', 202), ('dutch', 202), ('english', 202), ('finnish', 202),
('french', 202), ('german', 202), ('hungarian', 202), ('italian', 202),
('norwegian', 202), ('portuguese', 202), ('romanian', 202), ('none', 202),
@ -88,8 +88,8 @@ def test_post_create_transaction_with_language(b, client, nested, language,
assert res.json['message'] == expected_error_message
@pytest.mark.parametrize("field", ['asset', 'metadata'])
@pytest.mark.parametrize("value,err_key,expected_status_code", [
@pytest.mark.parametrize('field', ['asset', 'metadata'])
@pytest.mark.parametrize('value,err_key,expected_status_code', [
({'bad.key': 'v'}, 'bad.key', 400),
({'$bad.key': 'v'}, '$bad.key', 400),
({'$badkey': 'v'}, '$badkey', 400),