Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

test translation fix #30

Merged
merged 2 commits into from

2 participants

@gaftech

The test_crispy_tag_with_helper_form_show_errors (crispy_forms/tests/test.py, line 199) test fails if language is not english. When rendering template, "This field is required" is translated, so it should be tested against the translated version.

@maraujop
Owner

Thanks @gaftech

You are right, could you please update your pull request, so that all "This field is required" get translated, I believe you are missing another match.

Cheers

@gaftech
@maraujop maraujop merged commit 0e3b35e into from
@maraujop
Owner

Thanks @gaftech ! I just merged your fix in :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 22, 2012
  1. @gaftech

    test translation fix

    gaftech authored
Commits on Mar 25, 2012
  1. @gaftech

    test translation fix

    gaftech authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 crispy_forms/tests/tests.py
View
4 crispy_forms/tests/tests.py
@@ -196,7 +196,7 @@ def test_crispy_tag_with_helper_form_show_errors(self):
# Ensure those errors were rendered
self.assertTrue('<li>Passwords dont match</li>' in html)
- self.assertTrue('This field is required.' in html)
+ self.assertTrue(unicode(_('This field is required.')) in html)
self.assertTrue('error' in html)
# Now we render without errors
@@ -206,7 +206,7 @@ def test_crispy_tag_with_helper_form_show_errors(self):
# Ensure errors were not rendered
self.assertFalse('<li>Passwords dont match</li>' in html)
- self.assertFalse('This field is required.' in html)
+ self.assertFalse(unicode(_('This field is required.')) in html)
self.assertFalse('error' in html)
def test_crispy_tag_without_helper(self):
Something went wrong with that request. Please try again.