From b506c07e8466daa5ee9e2f3473ca546aa5ae2924 Mon Sep 17 00:00:00 2001 From: Martin Lees <drov0@users.noreply.github.com> Date: Mon, 11 Sep 2023 17:57:29 -0400 Subject: [PATCH] Added final tests, removed redudant checks in the python code --- hive/indexer/community.py | 12 +- .../mock_block_data_community.json | 82 ++++++++++ .../hive-111119_comments_type_3.pat.json | 153 ++++++++++++++++++ .../hive-111119_comments_type_3.tavern.yaml | 27 ++++ .../hive-211119_comments.pat.json | 68 ++++---- .../hive-311119_comments.pat.json | 62 +++---- .../created/community_1111119.pat.json | 70 ++++++++ .../created/community_2111119.pat.json | 4 +- .../created/community_3111119.pat.json | 4 +- 9 files changed, 404 insertions(+), 78 deletions(-) create mode 100644 tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments_type_3.pat.json create mode 100644 tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments_type_3.tavern.yaml diff --git a/hive/indexer/community.py b/hive/indexer/community.py index 1a0f5afed..dd43c1786 100644 --- a/hive/indexer/community.py +++ b/hive/indexer/community.py @@ -221,25 +221,19 @@ class Community: For a comment to be valid, these conditions apply: - Author is not muted in this community - - For council post/comment, author must be a member - - For journal post, author must be a member - Community must exist + + Note that the checks related to community types are performed on insert + via the sql function process_community_post """ assert community_id, 'no community_id' - community = cls._get_name(community_id) account_id = Accounts.get_id(comment_op['author']) role = cls.get_user_role(community_id, account_id) - type_id = int(community[5]) # TODO: check `nsfw` tag requirement #267 # TODO: (1.5) check that beneficiaries are valid - if type_id == TYPE_JOURNAL: - if not comment_op['parent_author']: - return role >= Role.member - elif type_id == TYPE_COUNCIL: - return role >= Role.member return role >= Role.guest # or at least not muted diff --git a/mock_data/block_data/community_op/mock_block_data_community.json b/mock_data/block_data/community_op/mock_block_data_community.json index 7999bb588..046875ac6 100644 --- a/mock_data/block_data/community_op/mock_block_data_community.json +++ b/mock_data/block_data/community_op/mock_block_data_community.json @@ -5292,6 +5292,88 @@ "body": "community type 3, notmember This comment will BE muted", "json_metadata": "{}" } + }, + { + "type": "custom_json_operation", + "value": { + "required_auths": [], + "required_posting_auths": [ + "hive-111119" + ], + "id": "community", + "json": "[\"setRole\",{\"community\":\"hive-111119\",\"account\":\"ismember\",\"role\":\"mod\"}]" + } + }, + { + "type": "custom_json_operation", + "value": { + "required_auths": [], + "required_posting_auths": [ + "hive-111119" + ], + "id": "community", + "json": "[\"updateProps\",{\"community\":\"hive-111119\",\"props\":{\"type_id\":3}}]" + } + }, + { + "type": "comment_operation", + "value": { + "parent_author": "", + "parent_permlink": "hive-111119", + "author": "ismember", + "permlink": "ismember-hive-111119-changed-type-3", + "title": "ismember This post will not be muted", + "body": "community is now type 3, ismember This post will not be muted", + "json_metadata": "{}" + } + }, + { + "type": "comment_operation", + "value": { + "parent_author": "", + "parent_permlink": "hive-111119", + "author": "notmember", + "permlink": "notmember-hive-111119-changed-type-3", + "title": "notmember This post will BE muted", + "body": "community is now type 3, notmember This post will BE muted", + "json_metadata": "{}" + } + }, + { + "type": "comment_operation", + "value": { + "parent_author": "ismember", + "parent_permlink": "ismember-hive-111119-changed-type-3", + "author": "ismember", + "permlink": "re-ismember-hive-111119-changed-type-3", + "title": "ismember This comment will not be muted", + "body": "community is now type 3, ismember This comment will not be muted", + "json_metadata": "{}" + } + }, + { + "type": "comment_operation", + "value": { + "parent_author": "ismember", + "parent_permlink": "re-ismember-hive-111119-changed-type-3", + "author": "ismember", + "permlink": "re-re-ismember-hive-111119-changed-type-3", + "title": "ismember, depth 2 comment, This comment will not be muted", + "body": "community is now type 3, ismember, depth 2 comment, This comment will not be muted", + "json_metadata": "{}" + } + }, + { + "type": "comment_operation", + "value": { + "parent_author": "ismember", + "parent_permlink": "ismember-hive-111119-changed-type-3", + "author": "notmember", + "permlink": "re-2-ismember-hive-111119-changed-type-3", + "title": "notmember This comment will BE muted", + "body": "community is now type 3, notmember This comment will BE muted", + "json_metadata": "{}" + } } ] } diff --git a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments_type_3.pat.json b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments_type_3.pat.json new file mode 100644 index 000000000..5add9e0b5 --- /dev/null +++ b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments_type_3.pat.json @@ -0,0 +1,153 @@ +{ + "ismember/ismember-hive-111119-changed-type-3": { + "active_votes": [], + "author": "ismember", + "author_payout_value": "0.000 HBD", + "author_reputation": 25, + "beneficiaries": [], + "blacklists": [], + "body": "community is now type 3, ismember This post will not be muted", + "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-changed-type-3", + "post_id": 1258126, + "promoted": "0.000 HBD", + "replies": [ + "ismember/re-ismember-hive-111119-changed-type-3", + "notmember/re-2-ismember-hive-111119-changed-type-3" + ], + "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-changed-type-3" + }, + "ismember/re-ismember-hive-111119-changed-type-3": { + "active_votes": [], + "author": "ismember", + "author_payout_value": "0.000 HBD", + "author_reputation": 25, + "beneficiaries": [], + "blacklists": [], + "body": "community is now type 3, ismember This comment will not be muted", + "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-changed-type-3", + "payout": 0.0, + "payout_at": "2016-09-22T19:47:54", + "pending_payout_value": "0.000 HBD", + "percent_hbd": 10000, + "permlink": "re-ismember-hive-111119-changed-type-3", + "post_id": 1258128, + "promoted": "0.000 HBD", + "replies": [ + "ismember/re-re-ismember-hive-111119-changed-type-3" + ], + "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-changed-type-3#@ismember/re-ismember-hive-111119-changed-type-3" + }, + "ismember/re-re-ismember-hive-111119-changed-type-3": { + "active_votes": [], + "author": "ismember", + "author_payout_value": "0.000 HBD", + "author_reputation": 25, + "beneficiaries": [], + "blacklists": [], + "body": "community is now type 3, ismember, depth 2 comment, This comment will not be muted", + "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-changed-type-3", + "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-changed-type-3", + "post_id": 1258129, + "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-changed-type-3#@ismember/re-re-ismember-hive-111119-changed-type-3" + }, + "notmember/re-2-ismember-hive-111119-changed-type-3": { + "active_votes": [], + "author": "notmember", + "author_payout_value": "0.000 HBD", + "author_reputation": 25, + "beneficiaries": [], + "blacklists": [], + "body": "community is now type 3, notmember This comment will BE muted", + "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-changed-type-3", + "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-changed-type-3", + "post_id": 1258130, + "promoted": "0.000 HBD", + "replies": [], + "stats": { + "flag_weight": 0.0, + "gray": true, + "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-changed-type-3#@notmember/re-2-ismember-hive-111119-changed-type-3" + } +} diff --git a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments_type_3.tavern.yaml b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments_type_3.tavern.yaml new file mode 100644 index 000000000..58afcf79b --- /dev/null +++ b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-111119_comments_type_3.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-changed-type-3"} + 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_discussion/hive-211119_comments.pat.json b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-211119_comments.pat.json index bf0045c86..2f77e03d8 100644 --- a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-211119_comments.pat.json +++ b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-211119_comments.pat.json @@ -1,13 +1,13 @@ { - "ismember/ismember-hive-111119": { + "ismember/ismember-hive-211119": { "active_votes": [], "author": "ismember", "author_payout_value": "0.000 HBD", "author_reputation": 25, "beneficiaries": [], "blacklists": [], - "body": "lorem ipsum", - "category": "hive-111119", + "body": "community type 2, ismember This post will not be muted", + "category": "hive-211119", "children": 3, "created": "2016-09-15T19:47:54", "curator_payout_value": "0.000 HBD", @@ -20,12 +20,12 @@ "payout_at": "2016-09-22T19:47:54", "pending_payout_value": "0.000 HBD", "percent_hbd": 10000, - "permlink": "ismember-hive-111119", - "post_id": 1258106, + "permlink": "ismember-hive-211119", + "post_id": 1258111, "promoted": "0.000 HBD", "replies": [ - "ismember/re-ismember-hive-111119", - "notmember/re-2-ismember-hive-111119" + "ismember/re-ismember-hive-211119", + "notmember/re-2-ismember-hive-211119" ], "stats": { "flag_weight": 0.0, @@ -33,19 +33,19 @@ "hide": false, "total_votes": 0 }, - "title": "ismember This post will not be muted", + "title": "community type 2, ismember This post will not be muted", "updated": "2016-09-15T19:47:54", - "url": "/hive-111119/@ismember/ismember-hive-111119" + "url": "/hive-211119/@ismember/ismember-hive-211119" }, - "ismember/re-ismember-hive-111119": { + "ismember/re-ismember-hive-211119": { "active_votes": [], "author": "ismember", "author_payout_value": "0.000 HBD", "author_reputation": 25, "beneficiaries": [], "blacklists": [], - "body": "lorem ipsum", - "category": "hive-111119", + "body": "community type 2, ismember This comment will not be muted", + "category": "hive-211119", "children": 1, "created": "2016-09-15T19:47:54", "curator_payout_value": "0.000 HBD", @@ -55,16 +55,16 @@ "max_accepted_payout": "1000000.000 HBD", "net_rshares": 0, "parent_author": "ismember", - "parent_permlink": "ismember-hive-111119", + "parent_permlink": "ismember-hive-211119", "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, + "permlink": "re-ismember-hive-211119", + "post_id": 1258113, "promoted": "0.000 HBD", "replies": [ - "ismember/re-re-ismember-hive-111119" + "ismember/re-re-ismember-hive-211119" ], "stats": { "flag_weight": 0.0, @@ -72,19 +72,19 @@ "hide": false, "total_votes": 0 }, - "title": "RE: ismember This post will not be muted", + "title": "RE: community type 2, 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" + "url": "/hive-211119/@ismember/ismember-hive-211119#@ismember/re-ismember-hive-211119" }, - "ismember/re-re-ismember-hive-111119": { + "ismember/re-re-ismember-hive-211119": { "active_votes": [], "author": "ismember", "author_payout_value": "0.000 HBD", "author_reputation": 25, "beneficiaries": [], "blacklists": [], - "body": "lorem ipsum", - "category": "hive-111119", + "body": "community type 2, ismember, depth 2 comment, This comment will not be muted", + "category": "hive-211119", "children": 0, "created": "2016-09-15T19:47:54", "curator_payout_value": "0.000 HBD", @@ -94,13 +94,13 @@ "max_accepted_payout": "1000000.000 HBD", "net_rshares": 0, "parent_author": "ismember", - "parent_permlink": "re-ismember-hive-111119", + "parent_permlink": "re-ismember-hive-211119", "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, + "permlink": "re-re-ismember-hive-211119", + "post_id": 1258114, "promoted": "0.000 HBD", "replies": [], "stats": { @@ -109,19 +109,19 @@ "hide": false, "total_votes": 0 }, - "title": "RE: ismember This post will not be muted", + "title": "RE: community type 2, 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" + "url": "/hive-211119/@ismember/ismember-hive-211119#@ismember/re-re-ismember-hive-211119" }, - "notmember/re-2-ismember-hive-111119": { + "notmember/re-2-ismember-hive-211119": { "active_votes": [], "author": "notmember", "author_payout_value": "0.000 HBD", "author_reputation": 25, "beneficiaries": [], "blacklists": [], - "body": "lorem ipsum", - "category": "hive-111119", + "body": "community type 2, notmember This comment will not be muted", + "category": "hive-211119", "children": 0, "created": "2016-09-15T19:47:54", "curator_payout_value": "0.000 HBD", @@ -131,13 +131,13 @@ "max_accepted_payout": "1000000.000 HBD", "net_rshares": 0, "parent_author": "ismember", - "parent_permlink": "ismember-hive-111119", + "parent_permlink": "ismember-hive-211119", "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, + "permlink": "re-2-ismember-hive-211119", + "post_id": 1258115, "promoted": "0.000 HBD", "replies": [], "stats": { @@ -146,8 +146,8 @@ "hide": false, "total_votes": 0 }, - "title": "RE: ismember This post will not be muted", + "title": "RE: community type 2, 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" + "url": "/hive-211119/@ismember/ismember-hive-211119#@notmember/re-2-ismember-hive-211119" } } diff --git a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-311119_comments.pat.json b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-311119_comments.pat.json index bf0045c86..dc21c3892 100644 --- a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-311119_comments.pat.json +++ b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_discussion/hive-311119_comments.pat.json @@ -1,13 +1,13 @@ { - "ismember/ismember-hive-111119": { + "ismember/ismember-hive-311119": { "active_votes": [], "author": "ismember", "author_payout_value": "0.000 HBD", "author_reputation": 25, "beneficiaries": [], "blacklists": [], - "body": "lorem ipsum", - "category": "hive-111119", + "body": "community type 3, ismember This post will not be muted", + "category": "hive-311119", "children": 3, "created": "2016-09-15T19:47:54", "curator_payout_value": "0.000 HBD", @@ -20,12 +20,12 @@ "payout_at": "2016-09-22T19:47:54", "pending_payout_value": "0.000 HBD", "percent_hbd": 10000, - "permlink": "ismember-hive-111119", - "post_id": 1258106, + "permlink": "ismember-hive-311119", + "post_id": 1258121, "promoted": "0.000 HBD", "replies": [ - "ismember/re-ismember-hive-111119", - "notmember/re-2-ismember-hive-111119" + "ismember/re-ismember-hive-311119", + "notmember/re-2-ismember-hive-311119" ], "stats": { "flag_weight": 0.0, @@ -35,17 +35,17 @@ }, "title": "ismember This post will not be muted", "updated": "2016-09-15T19:47:54", - "url": "/hive-111119/@ismember/ismember-hive-111119" + "url": "/hive-311119/@ismember/ismember-hive-311119" }, - "ismember/re-ismember-hive-111119": { + "ismember/re-ismember-hive-311119": { "active_votes": [], "author": "ismember", "author_payout_value": "0.000 HBD", "author_reputation": 25, "beneficiaries": [], "blacklists": [], - "body": "lorem ipsum", - "category": "hive-111119", + "body": "community type 3, ismember This comment will not be muted", + "category": "hive-311119", "children": 1, "created": "2016-09-15T19:47:54", "curator_payout_value": "0.000 HBD", @@ -55,16 +55,16 @@ "max_accepted_payout": "1000000.000 HBD", "net_rshares": 0, "parent_author": "ismember", - "parent_permlink": "ismember-hive-111119", + "parent_permlink": "ismember-hive-311119", "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, + "permlink": "re-ismember-hive-311119", + "post_id": 1258123, "promoted": "0.000 HBD", "replies": [ - "ismember/re-re-ismember-hive-111119" + "ismember/re-re-ismember-hive-311119" ], "stats": { "flag_weight": 0.0, @@ -74,17 +74,17 @@ }, "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" + "url": "/hive-311119/@ismember/ismember-hive-311119#@ismember/re-ismember-hive-311119" }, - "ismember/re-re-ismember-hive-111119": { + "ismember/re-re-ismember-hive-311119": { "active_votes": [], "author": "ismember", "author_payout_value": "0.000 HBD", "author_reputation": 25, "beneficiaries": [], "blacklists": [], - "body": "lorem ipsum", - "category": "hive-111119", + "body": "community type 3, ismember, depth 2 comment, This comment will not be muted", + "category": "hive-311119", "children": 0, "created": "2016-09-15T19:47:54", "curator_payout_value": "0.000 HBD", @@ -94,13 +94,13 @@ "max_accepted_payout": "1000000.000 HBD", "net_rshares": 0, "parent_author": "ismember", - "parent_permlink": "re-ismember-hive-111119", + "parent_permlink": "re-ismember-hive-311119", "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, + "permlink": "re-re-ismember-hive-311119", + "post_id": 1258124, "promoted": "0.000 HBD", "replies": [], "stats": { @@ -111,17 +111,17 @@ }, "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" + "url": "/hive-311119/@ismember/ismember-hive-311119#@ismember/re-re-ismember-hive-311119" }, - "notmember/re-2-ismember-hive-111119": { + "notmember/re-2-ismember-hive-311119": { "active_votes": [], "author": "notmember", "author_payout_value": "0.000 HBD", "author_reputation": 25, "beneficiaries": [], "blacklists": [], - "body": "lorem ipsum", - "category": "hive-111119", + "body": "community type 3, notmember This comment will BE muted", + "category": "hive-311119", "children": 0, "created": "2016-09-15T19:47:54", "curator_payout_value": "0.000 HBD", @@ -131,23 +131,23 @@ "max_accepted_payout": "1000000.000 HBD", "net_rshares": 0, "parent_author": "ismember", - "parent_permlink": "ismember-hive-111119", + "parent_permlink": "ismember-hive-311119", "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, + "permlink": "re-2-ismember-hive-311119", + "post_id": 1258125, "promoted": "0.000 HBD", "replies": [], "stats": { "flag_weight": 0.0, - "gray": false, + "gray": true, "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" + "url": "/hive-311119/@ismember/ismember-hive-311119#@notmember/re-2-ismember-hive-311119" } } 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 6ec85be2f..d11420844 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,4 +1,74 @@ [ + { + "active_votes": [], + "author": "notmember", + "author_payout_value": "0.000 HBD", + "author_reputation": 25, + "beneficiaries": [], + "blacklists": [], + "body": "community is now type 3, notmember This post will BE muted", + "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-changed-type-3", + "post_id": 1258127, + "promoted": "0.000 HBD", + "replies": [], + "stats": { + "flag_weight": 0.0, + "gray": true, + "hide": false, + "total_votes": 0 + }, + "title": "notmember This post will BE muted", + "updated": "2016-09-15T19:47:54", + "url": "/hive-111119/@notmember/notmember-hive-111119-changed-type-3" + }, + { + "active_votes": [], + "author": "ismember", + "author_payout_value": "0.000 HBD", + "author_reputation": 25, + "beneficiaries": [], + "blacklists": [], + "body": "community is now type 3, ismember This post will not be muted", + "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-changed-type-3", + "post_id": 1258126, + "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-changed-type-3" + }, { "active_votes": [], "author": "notmember", diff --git a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_ranked_posts/created/community_2111119.pat.json b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_ranked_posts/created/community_2111119.pat.json index 7fff1bcd8..db68f16ea 100644 --- a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_ranked_posts/created/community_2111119.pat.json +++ b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_ranked_posts/created/community_2111119.pat.json @@ -6,7 +6,7 @@ "author_reputation": 25, "beneficiaries": [], "blacklists": [], - "body": "community type 2", + "body": "community type 2, notmember This post will BE muted", "category": "hive-211119", "children": 0, "created": "2016-09-15T19:47:54", @@ -41,7 +41,7 @@ "author_reputation": 25, "beneficiaries": [], "blacklists": [], - "body": "lorem ipsum", + "body": "community type 2, ismember This post will not be muted", "category": "hive-211119", "children": 3, "created": "2016-09-15T19:47:54", diff --git a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_ranked_posts/created/community_3111119.pat.json b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_ranked_posts/created/community_3111119.pat.json index 67207ad7c..cf4cd2750 100644 --- a/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_ranked_posts/created/community_3111119.pat.json +++ b/tests/api_tests/hivemind/tavern/bridge_api_patterns/get_ranked_posts/created/community_3111119.pat.json @@ -6,7 +6,7 @@ "author_reputation": 25, "beneficiaries": [], "blacklists": [], - "body": "community type 3", + "body": "community type 3, notmember This post will BE muted", "category": "hive-311119", "children": 0, "created": "2016-09-15T19:47:54", @@ -41,7 +41,7 @@ "author_reputation": 25, "beneficiaries": [], "blacklists": [], - "body": "community type 3", + "body": "community type 3, ismember This post will not be muted", "category": "hive-311119", "children": 3, "created": "2016-09-15T19:47:54", -- GitLab