def __assert_fields(self, res, expected_ids, hidden_creator, hidden_comment):
    data = res.json['data']
    actual_ids = set([l['id'] for l in data])
    if (expected_ids != actual_ids):
        raise Exception((expected_ids, actual_ids))
    assert (expected_ids == actual_ids)
    for action in data:
        if hidden_creator:
            assert ('creator' not in action['relationships'])
        else:
            assert ('creator' in action['relationships'])
        if hidden_comment:
            assert ('comment' not in action['attributes'])
        else:
            assert ('comment' in action['attributes'])
def __assert_fields(self, res, expected_ids, hidden_creator, hidden_comment):
    data = res.json['data']
    actual_ids = set([l['id'] for l in data])
    if (expected_ids != actual_ids):
        raise Exception((expected_ids, actual_ids))
    assert (expected_ids == actual_ids)
    for action in data:
        if hidden_creator:
            assert ('creator' not in action['relationships'])
        else:
            assert ('creator' in action['relationships'])
        if hidden_comment:
            assert ('comment' not in action['attributes'])
        else:
            assert ('comment' in action['attributes'])