From c2f5eb21c635e4a09470f40de67748dcc8791d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Le=C5=9Bniak?= <klesniak@syncad.com> Date: Fri, 10 Jul 2020 15:11:54 +0200 Subject: [PATCH] added test for list_account_recovery_requests --- .../database_api/database_api_test.yaml | 7 ++ ...list_account_recovery_requests.json.schema | 77 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 hived/pyresttest_api_tests/database_api/list_account_recovery_requests.json.schema diff --git a/hived/pyresttest_api_tests/database_api/database_api_test.yaml b/hived/pyresttest_api_tests/database_api/database_api_test.yaml index 25cddfff..f7dac9c1 100644 --- a/hived/pyresttest_api_tests/database_api/database_api_test.yaml +++ b/hived/pyresttest_api_tests/database_api/database_api_test.yaml @@ -141,3 +141,10 @@ - method: "find_owner_histories" - args: '{ "owner": "null" }' - <<: *base_test + +- test: + - name: "list_account_recovery_requests" + - variable_binds: + - method: "list_account_recovery_requests" + - args: '{ "start": "null", "limit": 1, "order": "by_account" }' + - <<: *base_test diff --git a/hived/pyresttest_api_tests/database_api/list_account_recovery_requests.json.schema b/hived/pyresttest_api_tests/database_api/list_account_recovery_requests.json.schema new file mode 100644 index 00000000..fa13179f --- /dev/null +++ b/hived/pyresttest_api_tests/database_api/list_account_recovery_requests.json.schema @@ -0,0 +1,77 @@ +{ + "$schema": "http://json-schema.org/schema#", + "additionalProperties": false, + "type": "object", + "properties": { + "jsonrpc": { + "type": "string" + }, + "result": { + "type": "object", + "properties": { + "requests": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "account_to_recover": { + "type": "string" + }, + "new_owner_authority": { + "type": "object", + "properties": { + "weight_threshold": { + "type": "integer" + }, + "account_auths": { + "type": "array" + }, + "key_auths": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": [ + "integer", + "string" + ] + } + } + } + }, + "required": [ + "account_auths", + "key_auths", + "weight_threshold" + ] + }, + "expires": { + "type": "string" + } + }, + "required": [ + "account_to_recover", + "expires", + "id", + "new_owner_authority" + ] + } + } + }, + "required": [ + "requests" + ] + }, + "id": { + "type": "integer" + } + }, + "required": [ + "id", + "jsonrpc", + "result" + ] +} -- GitLab