def test_comment_settings(self, app, url, provider, actions, provider_admin, provider_moderator, node_admin):
    expected_ids = set([l._id for l in actions])
    for anonymous in [True, False]:
        for private in [True, False]:
            provider.reviews_comments_anonymous = anonymous
            provider.reviews_comments_private = private
            provider.save()
            res = app.get(url, auth=provider_admin.auth)
            self.__assert_fields(res, expected_ids, False, False)
            res = app.get(url, auth=provider_moderator.auth)
            self.__assert_fields(res, expected_ids, False, False)
            res = app.get(url, auth=node_admin.auth)
            self.__assert_fields(res, expected_ids, anonymous, private)
def test_comment_settings(self, app, url, provider, actions, provider_admin, provider_moderator, node_admin):
    expected_ids = set([l._id for l in actions])
    for anonymous in [True, False]:
        for private in [True, False]:
            provider.reviews_comments_anonymous = anonymous
            provider.reviews_comments_private = private
            provider.save()
            res = app.get(url, auth=provider_admin.auth)
            self.__assert_fields(res, expected_ids, False, False)
            res = app.get(url, auth=provider_moderator.auth)
            self.__assert_fields(res, expected_ids, False, False)
            res = app.get(url, auth=node_admin.auth)
            self.__assert_fields(res, expected_ids, anonymous, private)