diff --git a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_community/hive-111119.pat.json b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_community/hive-111119.pat.json new file mode 100644 index 0000000000000000000000000000000000000000..0c0746deb737dcf605cad471d63cdf9e89e25fb9 --- /dev/null +++ b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_community/hive-111119.pat.json @@ -0,0 +1,26 @@ +{ + "about": "", + "avatar_url": "", + "context": {}, + "created_at": "2016-09-15 19:47:51", + "description": "", + "flag_text": "", + "id": 92531, + "is_nsfw": false, + "lang": "en", + "name": "hive-111119", + "num_authors": 2, + "num_pending": 5, + "settings": {}, + "subscribers": 1, + "sum_pending": 0, + "team": [ + [ + "hive-111119", + "owner", + "" + ] + ], + "title": "@hive-111119", + "type_id": 1 +} diff --git a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_community/hive-111119.tavern.yaml b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_community/hive-111119.tavern.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cfdabae2064b2a55d2e32d2da661dbcbca3bd637 --- /dev/null +++ b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_community/hive-111119.tavern.yaml @@ -0,0 +1,28 @@ +--- + test_name: Hivemind + + marks: + - patterntest + # Communities not implemented under 5 mln blocks, but some were created by mock mechanism, therefore they are in result. + + includes: + - !include ../../common.yaml + + stages: + - name: test + request: + url: "{service.proto:s}://{service.server:s}:{service.port}/" + method: POST + headers: + content-type: application/json + json: + jsonrpc: "2.0" + id: 1 + method: "bridge.get_community" + params: {"name":"hive-111119"} + response: + status_code: 200 + verify_response_with: + function: validate_response:compare_response_with_pattern + extra_kwargs: + ignore_tags: "<bridge community>" diff --git a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments.pat.json b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments.pat.json new file mode 100644 index 0000000000000000000000000000000000000000..bf0045c8661abb854f196a8b1eb3cebd9ac95c9b --- /dev/null +++ b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments.pat.json @@ -0,0 +1,153 @@ +{ + "ismember/ismember-hive-111119": { + "active_votes": [], + "author": "ismember", + "author_payout_value": "0.000 HBD", + "author_reputation": 25, + "beneficiaries": [], + "blacklists": [], + "body": "lorem ipsum", + "category": "hive-111119", + "children": 3, + "created": "2016-09-15T19:47:54", + "curator_payout_value": "0.000 HBD", + "depth": 0, + "is_paidout": false, + "json_metadata": {}, + "max_accepted_payout": "1000000.000 HBD", + "net_rshares": 0, + "payout": 0.0, + "payout_at": "2016-09-22T19:47:54", + "pending_payout_value": "0.000 HBD", + "percent_hbd": 10000, + "permlink": "ismember-hive-111119", + "post_id": 1258106, + "promoted": "0.000 HBD", + "replies": [ + "ismember/re-ismember-hive-111119", + "notmember/re-2-ismember-hive-111119" + ], + "stats": { + "flag_weight": 0.0, + "gray": false, + "hide": false, + "total_votes": 0 + }, + "title": "ismember This post will not be muted", + "updated": "2016-09-15T19:47:54", + "url": "/hive-111119/@ismember/ismember-hive-111119" + }, + "ismember/re-ismember-hive-111119": { + "active_votes": [], + "author": "ismember", + "author_payout_value": "0.000 HBD", + "author_reputation": 25, + "beneficiaries": [], + "blacklists": [], + "body": "lorem ipsum", + "category": "hive-111119", + "children": 1, + "created": "2016-09-15T19:47:54", + "curator_payout_value": "0.000 HBD", + "depth": 1, + "is_paidout": false, + "json_metadata": {}, + "max_accepted_payout": "1000000.000 HBD", + "net_rshares": 0, + "parent_author": "ismember", + "parent_permlink": "ismember-hive-111119", + "payout": 0.0, + "payout_at": "2016-09-22T19:47:54", + "pending_payout_value": "0.000 HBD", + "percent_hbd": 10000, + "permlink": "re-ismember-hive-111119", + "post_id": 1258108, + "promoted": "0.000 HBD", + "replies": [ + "ismember/re-re-ismember-hive-111119" + ], + "stats": { + "flag_weight": 0.0, + "gray": false, + "hide": false, + "total_votes": 0 + }, + "title": "RE: ismember This post will not be muted", + "updated": "2016-09-15T19:47:54", + "url": "/hive-111119/@ismember/ismember-hive-111119#@ismember/re-ismember-hive-111119" + }, + "ismember/re-re-ismember-hive-111119": { + "active_votes": [], + "author": "ismember", + "author_payout_value": "0.000 HBD", + "author_reputation": 25, + "beneficiaries": [], + "blacklists": [], + "body": "lorem ipsum", + "category": "hive-111119", + "children": 0, + "created": "2016-09-15T19:47:54", + "curator_payout_value": "0.000 HBD", + "depth": 2, + "is_paidout": false, + "json_metadata": {}, + "max_accepted_payout": "1000000.000 HBD", + "net_rshares": 0, + "parent_author": "ismember", + "parent_permlink": "re-ismember-hive-111119", + "payout": 0.0, + "payout_at": "2016-09-22T19:47:54", + "pending_payout_value": "0.000 HBD", + "percent_hbd": 10000, + "permlink": "re-re-ismember-hive-111119", + "post_id": 1258109, + "promoted": "0.000 HBD", + "replies": [], + "stats": { + "flag_weight": 0.0, + "gray": false, + "hide": false, + "total_votes": 0 + }, + "title": "RE: ismember This post will not be muted", + "updated": "2016-09-15T19:47:54", + "url": "/hive-111119/@ismember/ismember-hive-111119#@ismember/re-re-ismember-hive-111119" + }, + "notmember/re-2-ismember-hive-111119": { + "active_votes": [], + "author": "notmember", + "author_payout_value": "0.000 HBD", + "author_reputation": 25, + "beneficiaries": [], + "blacklists": [], + "body": "lorem ipsum", + "category": "hive-111119", + "children": 0, + "created": "2016-09-15T19:47:54", + "curator_payout_value": "0.000 HBD", + "depth": 1, + "is_paidout": false, + "json_metadata": {}, + "max_accepted_payout": "1000000.000 HBD", + "net_rshares": 0, + "parent_author": "ismember", + "parent_permlink": "ismember-hive-111119", + "payout": 0.0, + "payout_at": "2016-09-22T19:47:54", + "pending_payout_value": "0.000 HBD", + "percent_hbd": 10000, + "permlink": "re-2-ismember-hive-111119", + "post_id": 1258110, + "promoted": "0.000 HBD", + "replies": [], + "stats": { + "flag_weight": 0.0, + "gray": false, + "hide": false, + "total_votes": 0 + }, + "title": "RE: ismember This post will not be muted", + "updated": "2016-09-15T19:47:54", + "url": "/hive-111119/@ismember/ismember-hive-111119#@notmember/re-2-ismember-hive-111119" + } +} diff --git a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments.tavern.yaml b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments.tavern.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9147141e1bf4919cd9bba0198599f45aaf38e222 --- /dev/null +++ b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments.tavern.yaml @@ -0,0 +1,27 @@ +--- + test_name: Hivemind + + marks: + - patterntest + + includes: + - !include ../../common.yaml + + stages: + - name: test + request: + url: "{service.proto:s}://{service.server:s}:{service.port}/" + method: POST + headers: + content-type: application/json + json: + jsonrpc: "2.0" + id: 1 + method: "bridge.get_discussion" + params: {"author":"ismember", "permlink":"ismember-hive-111119"} + response: + status_code: 200 + verify_response_with: + function: validate_response:compare_response_with_pattern + extra_kwargs: + ignore_tags: "<bridge discussion>" diff --git a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_ranked_posts/created/community_1111119.pat.json b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_ranked_posts/created/community_1111119.pat.json index fe51488c7066f6687ef680d6bfaa4f7768ef205c..6ec85be2f9b5e21284b1aca1353447391fa91e74 100644 --- a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_ranked_posts/created/community_1111119.pat.json +++ b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_ranked_posts/created/community_1111119.pat.json @@ -1 +1,72 @@ -[] +[ + { + "active_votes": [], + "author": "notmember", + "author_payout_value": "0.000 HBD", + "author_reputation": 25, + "beneficiaries": [], + "blacklists": [], + "body": "lorem ipsum", + "category": "hive-111119", + "children": 0, + "created": "2016-09-15T19:47:54", + "curator_payout_value": "0.000 HBD", + "depth": 0, + "is_paidout": false, + "json_metadata": {}, + "max_accepted_payout": "1000000.000 HBD", + "net_rshares": 0, + "payout": 0.0, + "payout_at": "2016-09-22T19:47:54", + "pending_payout_value": "0.000 HBD", + "percent_hbd": 10000, + "permlink": "notmember-hive-111119", + "post_id": 1258107, + "promoted": "0.000 HBD", + "replies": [], + "stats": { + "flag_weight": 0.0, + "gray": false, + "hide": false, + "total_votes": 0 + }, + "title": "notmember This post will not be muted", + "updated": "2016-09-15T19:47:54", + "url": "/hive-111119/@notmember/notmember-hive-111119" + }, + { + "active_votes": [], + "author": "ismember", + "author_payout_value": "0.000 HBD", + "author_reputation": 25, + "beneficiaries": [], + "blacklists": [], + "body": "lorem ipsum", + "category": "hive-111119", + "children": 3, + "created": "2016-09-15T19:47:54", + "curator_payout_value": "0.000 HBD", + "depth": 0, + "is_paidout": false, + "json_metadata": {}, + "max_accepted_payout": "1000000.000 HBD", + "net_rshares": 0, + "payout": 0.0, + "payout_at": "2016-09-22T19:47:54", + "pending_payout_value": "0.000 HBD", + "percent_hbd": 10000, + "permlink": "ismember-hive-111119", + "post_id": 1258106, + "promoted": "0.000 HBD", + "replies": [], + "stats": { + "flag_weight": 0.0, + "gray": false, + "hide": false, + "total_votes": 0 + }, + "title": "ismember This post will not be muted", + "updated": "2016-09-15T19:47:54", + "url": "/hive-111119/@ismember/ismember-hive-111119" + } +]