Commits

Mikhail Korobov committed 985ea85

Make tests work under Python 2.6 + Django 1.2

  • Participants
  • Parent commits 04e9431

Comments (0)

Files changed (2)

 [tox]
-envlist = py25,py26,py27,py32,py33,pypy,dj12,dj13,dj14,dj15
+envlist = py25,py26,py27,py32,py33,pypy,dj12,dj13,dj14,dj15,py26-dj12
 
 [testenv]
 ; current django
 [testenv:py33]
 deps=
     django >= 1.5
+
+[testenv:py26-dj12]
+basepython = python2.6
+deps=
+    django >= 1.2, <1.3

File widget_tweaks/tests.py

     def test_use_widget_required_class(self):
         res = render_form('{% render_field form.simple %}',
                           WIDGET_REQUIRED_CLASS='required_class')
-        self.assertIn('class="required_class"', res)
+        assertIn('class="required_class"', res)
 
     def test_use_widget_error_class(self):
         res = render_form('{% render_field form.simple %}', form=MyForm({}),
                           WIDGET_ERROR_CLASS='error_class')
-        self.assertIn('class="error_class"', res)
+        assertIn('class="error_class"', res)
 
     def test_use_widget_error_class_with_other_classes(self):
         res = render_form('{% render_field form.simple class="blue" %}',
                           form=MyForm({}), WIDGET_ERROR_CLASS='error_class')
-        self.assertIn('class="blue error_class"', res)
+        assertIn('class="blue error_class"', res)
 
     def test_use_widget_required_class_with_other_classes(self):
         res = render_form('{% render_field form.simple class="blue" %}',
                           form=MyForm({}), WIDGET_REQUIRED_CLASS='required_class')
-        self.assertIn('class="blue required_class"', res)
+        assertIn('class="blue required_class"', res)
 
 
 class RenderFieldTagFieldReuseTest(TestCase):