Move gettextutils installation in tests to core
gettextutils.install was done in tests/__init__.py, but this was not consistent with how test environment setup is done. We have code to set up the environment in core.py, so other environment setup should be there. Also, this makes tests/__init__.py cleaner. Change-Id: I762c8fa715e9c6ec26722fcd9b0ba0f9d613cb43
This commit is contained in:
parent
77092b406b
commit
103efd2e27
|
@ -14,16 +14,4 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from keystone.openstack.common import gettextutils
|
||||
|
||||
# NOTE(blk-u):
|
||||
# gettextutils.install() must run to set _ before importing any modules that
|
||||
# contain static translated strings.
|
||||
#
|
||||
# Configure gettextutils for deferred translation of messages
|
||||
# so that error messages in responses can be translated according to the
|
||||
# Accept-Language in the request rather than the Keystone server locale.
|
||||
gettextutils.install('keystone', lazy=True)
|
||||
|
||||
|
||||
from keystone.tests.core import * # flake8: noqa
|
||||
|
|
|
@ -30,6 +30,19 @@ from paste import deploy
|
|||
import stubout
|
||||
import testtools
|
||||
|
||||
|
||||
from keystone.openstack.common import gettextutils
|
||||
|
||||
# NOTE(blk-u):
|
||||
# gettextutils.install() must run to set _ before importing any modules that
|
||||
# contain static translated strings.
|
||||
#
|
||||
# Configure gettextutils for deferred translation of messages
|
||||
# so that error messages in responses can be translated according to the
|
||||
# Accept-Language in the request rather than the Keystone server locale.
|
||||
gettextutils.install('keystone', lazy=True)
|
||||
|
||||
|
||||
from keystone.common import environment
|
||||
environment.use_eventlet()
|
||||
|
||||
|
|
Loading…
Reference in New Issue