def test_searches_fields_non_sortable_response_field(dummy_parent): dummy_parent._meta['params_parser']._request.environ['QUERY_STRING'] = ( 'type=TestingSearchSchema') from snovault.elasticsearch.searches.fields import NonSortableResponseField nrf = NonSortableResponseField() r = nrf.render(parent=dummy_parent) assert r['non_sortable'] == [ 'pipeline_error_detail', 'description', 'notes' ]
def report(context, request): fr = FieldedResponse( _meta={ 'params_parser': ParamsParser(request) }, response_fields=[ TitleResponseField( title=REPORT_TITLE ), TypeResponseField( at_type=[REPORT_TITLE] ), IDResponseField(), ContextResponseField(), BasicReportWithFacetsResponseField(), AllResponseField(), NotificationResponseField(), FiltersResponseField(), TypeOnlyClearFiltersResponseField(), ColumnsResponseField(), NonSortableResponseField(), SortResponseField(), DebugQueryResponseField() ] ) return fr.render()