Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return BinOpAdd AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return BinOpAdd AttributeLoad NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str Return Call NameLoad keyword BinOpAdd BinOpAdd BinOpAdd SubscriptLoad NameLoad Index Num Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Str decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr BoolOpOr NameLoad ListLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Lambda arguments args defaults vararg kwarg AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Lambda arguments args defaults vararg kwarg AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Lambda arguments args defaults vararg kwarg AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A Test fixtures for working with oslo_i18n.

 N/A gettext N/A fixtures N/A six oslo_i18n _lazy oslo_i18n _message Translation N/A N/A fixtures Fixture N/A N/A Fixture for managing translatable strings.

    This class provides methods for creating translatable strings
    using both lazy translation and immediate translation. It can be
    used to generate the different types of messages returned from
    oslo_i18n to test code that may need to know about the type to
    handle them differently (for example, error handling in WSGI apps,
    or logging).

    Use this class to generate messages instead of toggling the global
    lazy flag and using the regular translation factory.

     __init__ N/A N/A self domain N/A test-domain N/A N/A Initialize the fixture.

        :param domain: The translation domain. This is not expected to
                       coincide with an actual set of message
                       catalogs, but it can.
        :type domain: str
         N/A N/A self domain domain N/A lazy N/A N/A self msg N/A N/A N/A Return a lazily translated message.

        :param msg: Input message string. May optionally include
                    positional or named string interpolation markers.
        :type msg: str or unicode

         N/A N/A N/A _message Message msg domain N/A self domain N/A immediate N/A N/A self msg N/A N/A N/A Return a string as though it had been translated immediately.

        :param msg: Input message string. May optionally include
                    positional or named string interpolation markers.
        :type msg: str or unicode

         N/A N/A N/A six text_type msg N/A N/A ToggleLazy N/A N/A fixtures Fixture N/A N/A Fixture to toggle lazy translation on or off for a test. __init__ N/A N/A self enabled N/A N/A N/A Force lazy translation on or off.

        :param enabled: Flag controlling whether to enable or disable
            lazy translation, passed to :func:`~oslo_i18n.enable_lazy`.
        :type enabled: bool
         N/A N/A N/A N/A super ToggleLazy self __init__ N/A N/A self _enabled enabled N/A N/A self _original_value N/A _lazy USE_LAZY N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super ToggleLazy self setUp N/A N/A N/A self addCleanup N/A self _restore_original N/A N/A N/A _lazy enable_lazy N/A self _enabled N/A _restore_original N/A N/A self N/A N/A N/A N/A N/A _lazy enable_lazy N/A self _original_value N/A N/A _PrefixTranslator N/A N/A gettext NullTranslations N/A N/A Translator that adds prefix to message ids

    NOTE: gettext.NullTranslations is an old style class

    :parm prefix: prefix to add to message id.  If not specified (None)
                  then 'noprefix' is used.
    :type prefix: string

     __init__ N/A N/A self fp prefix N/A None noprefix N/A N/A N/A N/A N/A gettext NullTranslations __init__ self fp N/A N/A self prefix prefix N/A gettext N/A N/A self message N/A N/A N/A msg N/A N/A N/A gettext NullTranslations gettext self message N/A N/A N/A self prefix msg N/A ugettext N/A N/A self message N/A N/A N/A msg N/A N/A N/A gettext NullTranslations ugettext self message N/A N/A N/A self prefix msg N/A N/A _prefix_translations N/A N/A N/A x y N/A N/A Use message id prefixed with domain and language as translation

     N/A N/A _PrefixTranslator prefix N/A N/A N/A N/A x N/A 0 / N/A N/A y N/A languages N/A 0 :  N/A PrefixLazyTranslation N/A N/A fixtures Fixture N/A N/A Fixture to prefix lazy translation enabled messages

    Use of this fixture will cause messages supporting lazy translation to
    be replaced with the message id prefixed with 'domain/language:'.
    For example, 'oslo/en_US: message about something'.  It will also
    override the available languages returned from
    oslo_18n.get_available_languages to the specified languages.

    This will enable tests to ensure that messages were translated lazily
    with the specified language and not immediately with the default language.

    NOTE that this does not work unless lazy translation is enabled, so it
    uses the ToggleLazy fixture to enable lazy translation.

    :param languages: list of languages to support.  If not specified (None)
                      then ['en_US'] is used.
    :type languages: list of strings

     N/A _DEFAULT_LANG en_US __init__ N/A N/A self languages locale N/A None None N/A N/A N/A N/A N/A super PrefixLazyTranslation self __init__ N/A N/A self languages N/A languages N/A N/A PrefixLazyTranslation _DEFAULT_LANG N/A N/A self locale locale N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super PrefixLazyTranslation self setUp N/A N/A N/A self useFixture N/A ToggleLazy True N/A N/A N/A self useFixture N/A N/A fixtures MonkeyPatch oslo_i18n._gettextutils.get_available_languages N/A N/A N/A N/A x y N/A self languages N/A N/A N/A self useFixture N/A N/A fixtures MonkeyPatch oslo_i18n.get_available_languages N/A N/A N/A N/A x y N/A self languages N/A N/A N/A self useFixture N/A N/A fixtures MonkeyPatch gettext.translation _prefix_translations N/A N/A N/A self useFixture N/A N/A fixtures MonkeyPatch locale.getdefaultlocale N/A N/A N/A N/A x y N/A self locale N/A N/A