Merge "Port horizon forms tests to Python 3"

This commit is contained in:
Jenkins 2015-09-08 17:43:36 +00:00 committed by Gerrit Code Review
commit accc2ccc47
2 changed files with 3 additions and 4 deletions

View File

@ -91,7 +91,7 @@ class FormErrorTests(test.TestCase):
self.form.set_warning(warning_text)
self.assertEqual([warning_text], self.form.warnings)
resp = self._render_form()
self.assertIn(warning_text, resp.content)
self.assertIn(warning_text.encode('utf-8'), resp.content)
def test_api_error(self):
error_text = 'ERROR 12938'
@ -99,7 +99,7 @@ class FormErrorTests(test.TestCase):
self.form.api_error(error_text)
self.assertEqual([error_text], self.form.non_field_errors())
resp = self._render_form()
self.assertIn(error_text, resp.content)
self.assertIn(error_text.encode('utf-8'), resp.content)
class TestChoiceFieldForm(forms.SelfHandlingForm):

View File

@ -23,8 +23,7 @@ commands = /bin/bash run_tests.sh -N --no-pep8 {posargs}
commands =
python manage.py test --settings=horizon.test.settings \
horizon.test.tests.base.GetUserHomeTests \
horizon.test.tests.forms.ChoiceFieldTests \
horizon.test.tests.forms.FormMixinTests \
horizon.test.tests.forms \
horizon.test.tests.middleware \
horizon.test.tests.tables.DataTableViewTests \
horizon.test.tests.templatetags \