From 46f0350a3f0d3ee88a6ef2f914fe11f24c7dac55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Le=C5=9Bniak?= <klesniak@syncad.com> Date: Mon, 13 Jul 2020 14:28:32 +0200 Subject: [PATCH] added find_vesting_delegation_expirations test --- .../database_api/database_api_test.yaml | 7 ++ ...vesting_delegation_expirations.schema.json | 70 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 hived/pyresttest_api_tests/database_api/find_vesting_delegation_expirations.schema.json 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 b71dceaa..84e9a479 100644 --- a/hived/pyresttest_api_tests/database_api/database_api_test.yaml +++ b/hived/pyresttest_api_tests/database_api/database_api_test.yaml @@ -232,3 +232,10 @@ - method: "list_vesting_delegation_expirations" - args: '{ "start": ["1970-01-01T00:00:00", 0], "limit": 10, "order": "by_expiration" }' - <<: *base_test + +- test: + - name: "find_vesting_delegation_expirations" + - variable_binds: + - method: "find_vesting_delegation_expirations" + - args: '{ "account": "giftgiver" }' + - <<: *base_test diff --git a/hived/pyresttest_api_tests/database_api/find_vesting_delegation_expirations.schema.json b/hived/pyresttest_api_tests/database_api/find_vesting_delegation_expirations.schema.json new file mode 100644 index 00000000..38ab23fb --- /dev/null +++ b/hived/pyresttest_api_tests/database_api/find_vesting_delegation_expirations.schema.json @@ -0,0 +1,70 @@ +{ + "$schema": "http://json-schema.org/schema#", + "additionalProperties": false, + "type": "object", + "properties": { + "jsonrpc": { + "type": "string" + }, + "result": { + "type": "object", + "properties": { + "delegations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "delegator": { + "type": "string" + }, + "vesting_shares": { + "type": "object", + "properties": { + "amount": { + "pattern": "[0-9]+", + "type": "string" + }, + "precision": { + "type": "integer" + }, + "nai": { + "pattern": "^@@[0-9]+$", + "type": "string" + } + }, + "required": [ + "amount", + "nai", + "precision" + ] + }, + "expiration": { + "type": "string" + } + }, + "required": [ + "delegator", + "expiration", + "id", + "vesting_shares" + ] + } + } + }, + "required": [ + "delegations" + ] + }, + "id": { + "type": "integer" + } + }, + "required": [ + "id", + "jsonrpc", + "result" + ] +} -- GitLab