added language manager test

This commit is contained in:
Andreas Preikschat 2013-02-19 11:54:24 +01:00
parent ca23aedb5d
commit 019e59d81f

View File

@ -0,0 +1,26 @@
"""
Functional tests for the Language Manager.
"""
from unittest import TestCase
from mock import patch
from openlp.core.utils import LanguageManager
class TestLanguageManager(TestCase):
"""
A test suite to test out various methods around the LanguageManager class.
"""
def get_translator_linux_test(self):
"""
"""
with patch(u'openlp.core.utils.sys.platform') as mocked_platform:
# GIVEN: We are on linux.
mocked_platform.return_value = u'linux2'
app_translator, default_translator = LanguageManager.get_translator('en')
assert not app_translator.isEmpty(), u'The application translator should not be empty'
assert not default_translator.isEmpty(), u'The default translator should not be empty'