<s> from __future__ import absolute_import <EOL> from sentry . api . base import DocSection <EOL> from sentry . api . bases import GroupEndpoint <EOL> from sentry . api . serializers import serialize <EOL> from sentry . models import Group , GroupHash <EOL> from sentry . utils . apidocs import scenario , attach_scenarios <EOL> @ scenario ( '<STR_LIT>' ) <EOL> def list_available_hashes_scenario ( runner ) : <EOL> group = Group . objects . filter ( project = runner . default_project ) . first ( ) <EOL> runner . request ( <EOL> method = '<STR_LIT:GET>' , <EOL> path = '<STR_LIT>' % group . id <EOL> ) <EOL> class GroupHashesEndpoint ( GroupEndpoint ) : <EOL> doc_section = DocSection . EVENTS <EOL> @ attach_scenarios ( [ list_available_hashes_scenario ] ) <EOL> def get ( self , request , group ) : <EOL> """<STR_LIT>""" <EOL> queryset = GroupHash . objects . filter ( <EOL> group = group . id , <EOL> ) <EOL> return self . paginate ( <EOL> request = request , <EOL> queryset = queryset , <EOL> order_by = '<STR_LIT:id>' , <EOL> on_results = lambda x : serialize ( x , request . user ) , <EOL> ) </s>
