← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1328589] Re: Tests fails with non english locale settings

 

[Expired for OpenStack Identity (keystone) because there has been no
activity for 60 days.]

** Changed in: keystone
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1328589

Title:
  Tests fails with non english locale settings

Status in OpenStack Identity (keystone):
  Expired

Bug description:
  When the locale environment setting uses a language other than
  english, some Keystone tests fails.

   $> locale -a
   C
   C.UTF-8
   en_US.utf8
   fr_BE.utf8
   fr_FR
   fr_FR.iso88591
   fr_FR.utf8
   POSIX

   $> LANG=en_US.utf8 ./run_tests.sh
   [ ... ]
   Ran 3283 tests in 158.885s
   OK

   $>LANG=fr_FR.utf8 ./run_tests.sh
   [ ... ]
   Ran 3286 tests in 161.606s
   FAILED (failures=3)

  There are 3 failing tests:
   - keystone.tests.test_backend_ldap.LDAPIdentity.test_wrong_ldap_scope
   - keystone.tests.test_backend_ldap.LDAPIdentityEnabledEmulation.test_wrong_ldap_scope
   - keystone.tests.test_wsgi.LocalizedResponseTest.test_get_localized_response

  The two first are in fact only one test (called twice).
  The test compares two string values, but they don't match because one of them is translated.

  The last test fails because the message
  exception.NotFound.message_format is translated, in
  http://git.openstack.org/cgit/openstack/keystone/tree/keystone/tests/test_wsgi.py#n356

  # keystone/tests/test_wsgi.py
  354:            class LangTranslator(object):
  355:                def ugettext(self, msgid):
                               # This condition is broken if exception.NotFound.message_format is translated.
  356:                    if msgid == exception.NotFound.message_format:
  357:                        return xlated_msg_fmt
  358:                    return msgid
  359:
  360:                gettext = ugettext

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1328589/+subscriptions


References