mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(FastAPI): rpc - include other fields with errors
PHP does this, we should persist the behavior here for v=5. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
06ec6388b4
commit
0bbb3cc4d0
2 changed files with 30 additions and 10 deletions
|
@ -323,7 +323,13 @@ def test_rpc_bad_type():
|
|||
|
||||
def test_rpc_bad_version():
|
||||
# Define expected response.
|
||||
expected_data = {'error': 'Invalid version specified.'}
|
||||
expected_data = {
|
||||
'version': 0,
|
||||
'resultcount': 0,
|
||||
'results': [],
|
||||
'type': 'error',
|
||||
'error': 'Invalid version specified.'
|
||||
}
|
||||
|
||||
# Make dummy request.
|
||||
response = make_request("/rpc/?v=0&type=info&arg=big-chungus")
|
||||
|
@ -337,7 +343,13 @@ def test_rpc_bad_version():
|
|||
|
||||
def test_rpc_no_version():
|
||||
# Define expected response.
|
||||
expected_data = {'error': 'Please specify an API version.'}
|
||||
expected_data = {
|
||||
'version': None,
|
||||
'resultcount': 0,
|
||||
'results': [],
|
||||
'type': 'error',
|
||||
'error': 'Please specify an API version.'
|
||||
}
|
||||
|
||||
# Make dummy request.
|
||||
response = make_request("/rpc/?type=info&arg=big-chungus")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue