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 643160f37e57408750dfc17b7b03c3149a59f496..5e3de0bb53ef3567eea4d26d4aefaf159c88f0c4 100644 --- a/hived/pyresttest_api_tests/database_api/database_api_test.yaml +++ b/hived/pyresttest_api_tests/database_api/database_api_test.yaml @@ -176,3 +176,10 @@ - method: "list_escrows" - args: '{ "start": ["initminer", 0], "limit": 10, "order": "by_from_id" }' - <<: *base_test + +- test: + - name: "find_escrows" + - variable_binds: + - method: "find_escrows" + - args: '{ "from": "temp" }' + - <<: *base_test diff --git a/hived/pyresttest_api_tests/database_api/find_escrows.json.schema b/hived/pyresttest_api_tests/database_api/find_escrows.json.schema new file mode 100644 index 0000000000000000000000000000000000000000..27807b0465168b12cfc15417c01b23e0b12f3714 --- /dev/null +++ b/hived/pyresttest_api_tests/database_api/find_escrows.json.schema @@ -0,0 +1,142 @@ +{ + "$schema": "http://json-schema.org/schema#", + "additionalProperties": false, + "type": "object", + "properties": { + "jsonrpc": { + "type": "string" + }, + "result": { + "type": "object", + "properties": { + "escrows": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "escrow_id": { + "type": "integer" + }, + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "agent": { + "type": "string" + }, + "ratification_deadline": { + "type": "string" + }, + "escrow_expiration": { + "type": "string" + }, + "hbd_balance": { + "type": "object", + "properties": { + "amount": { + "pattern": "[0-9]+", + "type": "string" + }, + "precision": { + "type": "integer" + }, + "nai": { + "pattern": "^@@[0-9]+$", + "type": "string" + } + }, + "required": [ + "amount", + "nai", + "precision" + ] + }, + "hive_balance": { + "type": "object", + "properties": { + "amount": { + "pattern": "[0-9]+", + "type": "string" + }, + "precision": { + "type": "integer" + }, + "nai": { + "pattern": "^@@[0-9]+$", + "type": "string" + } + }, + "required": [ + "amount", + "nai", + "precision" + ] + }, + "pending_fee": { + "type": "object", + "properties": { + "amount": { + "pattern": "[0-9]+", + "type": "string" + }, + "precision": { + "type": "integer" + }, + "nai": { + "pattern": "^@@[0-9]+$", + "type": "string" + } + }, + "required": [ + "amount", + "nai", + "precision" + ] + }, + "to_approved": { + "type": "boolean" + }, + "agent_approved": { + "type": "boolean" + }, + "disputed": { + "type": "boolean" + } + }, + "required": [ + "agent", + "agent_approved", + "disputed", + "escrow_expiration", + "escrow_id", + "from", + "hbd_balance", + "hive_balance", + "id", + "pending_fee", + "ratification_deadline", + "to", + "to_approved" + ] + } + } + }, + "required": [ + "escrows" + ] + }, + "id": { + "type": "integer" + } + }, + "required": [ + "id", + "jsonrpc", + "result" + ] +}