l.t.u.t.helpers : module documentation

Part of lp.translations.utilities.tests

Helper module reused in different tests.
Function import_pofile_or_potemplate Import a POFile or POTemplate from the given string.
Function is_valid_mofile Test whether a string is a valid MO file.
def import_pofile_or_potemplate(file_contents, person, pofile=None, potemplate=None, by_maintainer=True):
Import a POFile or POTemplate from the given string.
Parametersfile_contentstext of "file" to import, or a seekable file object containing the text.
personparty requesting the import.
pofileif uploading a POFile, file to import to; None otherwise.
potemplateif uploading a POTemplate, file to import to; None otherwise.
by_maintainertrue if this file was uplaoded by the maintainer of the project or package.
ReturnsTranslationImportQueueEntry as added to the import queue.
def is_valid_mofile(mofile):
Test whether a string is a valid MO file.
API Documentation for Launchpad, generated by pydoctor at 2018-10-17 00:00:11.