          self.assertTrue('form_url' in response.context, msg='form_url not present in response.context')
          self.assertEqual(response.context['form_url'], 'pony')
  
  class AdminJavaScriptTest(AdminViewBasicTest):
      urls = "regressiontests.admin_views.urls"
  
      def testSingleWidgetFirsFieldFocus(self):
          """
          JavaScript-assisted auto-focus on first field.
 
</s> remove     return {'title': spec.title, 'choices' : list(spec.choices(cl))}
 </s> add     tpl = get_template(spec.template)
    return tpl.render(Context({
        'title': spec.title,
        'choices' : list(spec.choices(cl)),
        'spec': spec,
    }))
    def test_filter_with_custom_template(self):
        """
        Ensure that one can use a custom template to render an admin filter.
        Refs #17515.
        """
        template_dirs = settings.TEMPLATE_DIRS + (
            os.path.join(os.path.dirname(__file__), 'templates'),)
        with self.settings(TEMPLATE_DIRS=template_dirs):
            response = self.client.get("/test_admin/admin/admin_views/color2/")
            self.assertTrue('custom_filter_template.html' in [t.name for t in response.templates])


          self.assertTrue('form_url' in response.context, msg='form_url not present in response.context')
          self.assertEqual(response.context['form_url'], 'pony')
  
    def test_filter_with_custom_template(self):
        """
        Ensure that one can use a custom template to render an admin filter.
        Refs #17515.
        """
        template_dirs = settings.TEMPLATE_DIRS + (
            os.path.join(os.path.dirname(__file__), 'templates'),)
        with self.settings(TEMPLATE_DIRS=template_dirs):
            response = self.client.get("/test_admin/admin/admin_views/color2/")
            self.assertTrue('custom_filter_template.html' in [t.name for t in response.templates])


  class AdminJavaScriptTest(AdminViewBasicTest):
      urls = "regressiontests.admin_views.urls"
  
      def testSingleWidgetFirsFieldFocus(self):
          """
          JavaScript-assisted auto-focus on first field.
keep keep add keep keep keep keep keep keep
 Fixed #17515 -- Added ability to override the template of custom admin FilterSpec classes. Thanks, saxix and Julien Phalip.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17483 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
tests/regressiontests/admin_views/tests.py