def test_get_location_term(self): # Location term should come from the job on the job detail page location_term = context_tools.get_location_term(self.job_detail_request, **self.job_detail_kwargs) self.assertEqual(self.job['location'], location_term) location_term = context_tools.get_location_term(self.search_results_request) self.assertEqual(location_term, '')
def test_get_location_term(self): # Location term should come from the job on the job detail page location_term = context_tools.get_location_term( self.job_detail_request, **self.job_detail_kwargs) self.assertEqual(self.job['location'], location_term) location_term = context_tools.get_location_term( self.search_results_request) self.assertEqual(location_term, '')
def context(self, request, **kwargs): return { 'location_term': context_tools.get_location_term(request, **kwargs), 'moc_term': context_tools.get_moc_term(request), 'moc_id_term': context_tools.get_moc_id_term(request), 'search_url': context_tools.get_search_url(request), 'site_config': context_tools.get_site_config(request), 'title_term': context_tools.get_title_term(request), 'total_jobs_count': context_tools.get_total_jobs_count(request), }
def context(self, request, **kwargs): return { 'arranged_jobs': context_tools.get_arranged_jobs(request), 'results_heading': context_tools.get_results_heading(request), 'default_jobs': context_tools.get_default_jobs(request), 'featured_jobs': context_tools.get_featured_jobs(request), 'location_term': context_tools.get_location_term(request), 'moc_term': context_tools.get_moc_term(request), 'query_string': context_tools.get_query_string(request), 'title_term': context_tools.get_title_term(request), }
def context(self, request, **kwargs): return { 'arranged_jobs': context_tools.get_arranged_jobs(request), 'data_type': '', 'default_jobs': context_tools.get_default_jobs(request), 'featured_jobs': context_tools.get_featured_jobs(request), 'location_term': context_tools.get_location_term(request), 'moc_term': context_tools.get_moc_term(request), 'query_string': context_tools.get_query_string(request), 'results_heading': context_tools.get_results_heading(request), 'site_commitments_string': context_tools.get_site_commitments_string(request), 'site_config': context_tools.get_site_config(request), 'site_tags': settings.SITE_TAGS, 'title_term': context_tools.get_title_term(request), }
def context(self, request, **kwargs): site_buid_objects = BusinessUnit.objects.filter( id__in=settings.SITE_BUIDS) return { 'arranged_jobs': context_tools.get_arranged_jobs(request), 'data_type': '', 'default_jobs': context_tools.get_default_jobs(request), 'featured_jobs': context_tools.get_featured_jobs(request), 'location_term': context_tools.get_location_term(request), 'moc_term': context_tools.get_moc_term(request), 'query_string': context_tools.get_query_string(request), 'results_heading': context_tools.get_results_heading(request), 'site_commitments_string': context_tools.get_site_commitments_string(request), 'site_config': context_tools.get_site_config(request), 'site_tags': settings.SITE_TAGS, 'title_term': context_tools.get_title_term(request), 'analytics_info': json.dumps({ 'site_business_units': ([bu.title for bu in site_buid_objects]), 'default_facet_names': ([df.name for df in settings.DEFAULT_FACET]), 'featured_facet_names': ([ff.name for ff in settings.FEATURED_FACET]) }) }
def context(self, request, **kwargs): site_buid_objects = BusinessUnit.objects.filter(id__in=settings.SITE_BUIDS) return { 'arranged_jobs': context_tools.get_arranged_jobs(request), 'data_type': '', 'default_jobs': context_tools.get_default_jobs(request), 'featured_jobs': context_tools.get_featured_jobs(request), 'location_term': context_tools.get_location_term(request), 'moc_term': context_tools.get_moc_term(request), 'query_string': context_tools.get_query_string(request), 'results_heading': context_tools.get_results_heading(request), 'site_commitments_string': context_tools.get_site_commitments_string(request), 'site_config': context_tools.get_site_config(request), 'site_tags': settings.SITE_TAGS, 'title_term': context_tools.get_title_term(request), 'analytics_info': json.dumps({ 'site_business_units': ([bu.title for bu in site_buid_objects]), 'default_facet_names': ([df.name for df in settings.DEFAULT_FACET]), 'featured_facet_names': ([ff.name for ff in settings.FEATURED_FACET]) }) }