Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#6958 closed (fixed)

Some tests of newforms-admin depend on settings.LANGUAGE_CODE

Reported by: remohammadi Owned by: brosner
Component: Testing framework Version: newforms-admin
Severity: Keywords: nfa-blocker
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by gwilson)

File "/usr/lib/python2.5/site-packages/django/contrib/auth/tests/", line ?, in django.contrib.auth.tests.__test__.FORM_TESTS
Failed example:
    [u'This value must contain only letters, numbers and underscores.']
    [u'\u0627\u06cc\u0646 \u0645\u0642\u062f\u0627\u0631 \u0641\u0642\u0637 \u0628\u0627\u06cc\u062f \u062d\u0627\u0648\u06cc \u06a9\u0644\u0645\u0627\u062a\u060c \u0634\u0645\u0627\u0631\u0647 \u0647\u0627 \u0648 \u06cc\u0627 \u062e\u0637 \u0632\u06cc\u0631 \u0628\u0627\u0634\u062f.']

Is it ok to add these lines before tests dependent on LANGUAGE_CODE?

>>> import settings
>>> settings.LANGUAGE_CODE = "en-us"

Change History (6)

comment:1 Changed 8 years ago by gwilson

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

fixed description formatting.

comment:2 Changed 8 years ago by brosner

  • Owner changed from nobody to brosner
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

Yes, indeed this needs to be fixed. The tests expect en-us so they should be setup that way for those tests.

comment:3 Changed 8 years ago by brosner

  • Keywords nfa-blocker added

comment:4 Changed 8 years ago by brosner

Actually looking into this bit more, but not fully indicates this probably a result of #6774. Once that is fixed I suspect that will solve part of this. Will look more into this.

comment:5 Changed 8 years ago by brosner

  • Resolution set to fixed
  • Status changed from assigned to closed

It appears this problem has gone away with r6774. The test framework actually correctly does this and now that the strings are properly marked for translation it works.

comment:6 Changed 8 years ago by brosner

Err, correction: I meant r7449 not r6774 ;)

Note: See TracTickets for help on using tickets.
Back to Top