Skip to content
Snippets Groups Projects
Commit 14313491 authored by Andrzej Lisak's avatar Andrzej Lisak
Browse files

[ABW]: added negative tests for get_follow_count

parent 594610ed
No related branches found
No related tags found
1 merge request!148Readme files to condenser_api calls
Showing
with 131 additions and 7 deletions
{
"code": -32602,
"data": "account not found: `nonexisting`",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "Account nonexisting does not exist",
"message": "Invalid parameters"
}
---
test_name: Hivemind condenser_api.get_follow_count
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_follow_count
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_follow_count"
params: {"account":"nonexisting"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "bad_account"
directory: "condenser_api_negative/get_follow_count"
error_response: true
{
"code": -32602,
"data": "invalid account (not specified)",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "invalid account (not specified)",
"message": "Invalid parameters"
}
---
test_name: Hivemind condenser_api.get_follow_count
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_follow_count
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_follow_count"
params: {"account":""}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "empty_account"
directory: "condenser_api_negative/get_follow_count"
error_response: true
{
"code": -32602,
"data": "'account' parameter lacking default value",
"message": "Invalid parameters"
}
{
"code": -32602,
"data": "missing a required argument: 'account'",
"message": "Invalid parameters"
}
---
test_name: Hivemind condenser_api.get_follow_count
marks:
- patterntest
- negative
includes:
- !include ../../common.yaml
stages:
- name: get_follow_count
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_follow_count"
params: {}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "no_account"
directory: "condenser_api_negative/get_follow_count"
error_response: true
Gives content for given post. Gives content for given post.
Current version gives output matching that of old Fat Node (database_api style posts). Original get_content output
is still available through tags_api.get_discussion
method: "condenser_api.get_content" method: "condenser_api.get_content"
params: params:
{ {
"account": "{account}", "permlink": {permlink}, "author": "{author}", "permlink": {permlink},
mandatory, points to valid post author + permlink : mandatory, points to valid post
"observer": "{account}", "observer": "{account}"
optional, used for muted votes and blacklists optional, used for muted votes and blacklists
} }
Lists replies for given post. Lists replies for given post.
Current version gives output matching that of old Fat Node (database_api style posts). Original get_content_replies output
is still available through tags_api.get_content_replies
method: "condenser_api.get_content_replies" method: "condenser_api.get_content_replies"
params: params:
{ {
"author": "{author}", "permlink": {permlink}, "author": "{author}", "permlink": {permlink}
mandatory, points to valid post author + permlink : mandatory, points to valid post
} }
...@@ -5,6 +5,6 @@ params: ...@@ -5,6 +5,6 @@ params:
{ {
"account":"{account}", "account":"{account}",
mandatory, point on valid account mandatory, points to valid account
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment