From 8486f440fb18d513468b696f84c0efe833298d77 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Mon, 20 Feb 2017 00:30:36 +0100 Subject: [PATCH] [enh] Add unit test mechanism (#254) --- src/yunohost/tests/__init__.py | 0 src/yunohost/tests/conftest.py | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/yunohost/tests/__init__.py create mode 100644 src/yunohost/tests/conftest.py diff --git a/src/yunohost/tests/__init__.py b/src/yunohost/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/yunohost/tests/conftest.py b/src/yunohost/tests/conftest.py new file mode 100644 index 00000000..2845de4e --- /dev/null +++ b/src/yunohost/tests/conftest.py @@ -0,0 +1,16 @@ +import sys +import moulinette + +sys.path.append("..") + +old_init = moulinette.core.Moulinette18n.__init__ + + +def monkey_path_i18n_init(self, package, default_locale="en"): + old_init(self, package, default_locale) + self.load_namespace("yunohost") + + +moulinette.core.Moulinette18n.__init__ = monkey_path_i18n_init + +moulinette.init()