Exemplo n.º 1
0
 def test_py_no_lang_files_defined(self):
     """
     If `LANG_FILES` is not defined a list containing the first item in
     `settings.DOTLANG_FILES` should be returned.
     """
     lang_files = langfiles_for_path("lib/l10n_utils/tests/test_files/" "extract_me.py")
     eq_(lang_files, [settings.DOTLANG_FILES[0]])
Exemplo n.º 2
0
 def test_py_lang_files_defined(self):
     """
     If `LANG_FILES` is defined a list of the values should be returned.
     """
     lang_files = langfiles_for_path('lib/l10n_utils/tests/test_files/'
                                     'extract_me_with_langfiles.py')
     eq_(lang_files, ['lebowski', 'dude'])
Exemplo n.º 3
0
 def test_py_lang_files_defined(self):
     """
     If `LANG_FILES` is defined a list of the values should be returned.
     """
     lang_files = langfiles_for_path('lib/l10n_utils/tests/test_files/'
                                     'extract_me_with_langfiles.py')
     eq_(lang_files, ['lebowski', 'dude'])
Exemplo n.º 4
0
 def test_tmpl_no_lang_files_defined(self):
     """
     If no lang files are set, a lang file name derived from the template
     path should be used.
     """
     lang_files = langfiles_for_path("lib/l10n_utils/tests/test_files/" "templates/no_lang_files.html")
     eq_(lang_files, ["no_lang_files"])
Exemplo n.º 5
0
 def test_py_no_lang_files_defined(self):
     """
     If `LANG_FILES` is not defined a list containing the first item in
     `settings.DOTLANG_FILES` should be returned.
     """
     lang_files = langfiles_for_path('lib/l10n_utils/tests/test_files/'
                                     'extract_me.py')
     eq_(lang_files, [settings.DOTLANG_FILES[0]])
Exemplo n.º 6
0
 def test_tmpl_no_lang_files_defined(self):
     """
     If no lang files are set, a lang file name derived from the template
     path should be used.
     """
     lang_files = langfiles_for_path('lib/l10n_utils/tests/test_files/'
                                     'templates/no_lang_files.html')
     eq_(lang_files, ['no_lang_files'])
Exemplo n.º 7
0
 def test_tmpl_no_lang_files_defined(self):
     """
     If no lang files are set, a lang file name derived from the template
     path should be used.
     """
     lang_files = langfiles_for_path('lib/l10n_utils/tests/test_files/'
                                     'templates/no_lang_files.html')
     assert lang_files == ['no_lang_files']
Exemplo n.º 8
0
 def test_templ_lang_files_defined(self):
     """ If lang files are set, they should be returned. """
     lang_files = langfiles_for_path('lib/l10n_utils/tests/test_files/'
                                     'templates/some_lang_files.html')
     eq_(lang_files, ['dude', 'walter', 'main'])
Exemplo n.º 9
0
 def test_templ_lang_files_defined(self):
     """ If lang files are set, they should be returned. """
     lang_files = langfiles_for_path('lib/l10n_utils/tests/test_files/'
                                     'templates/some_lang_files.html')
     eq_(lang_files, ['dude', 'walter', 'main'])
Exemplo n.º 10
0
 def test_py_lang_files_defined(self):
     """
     If `LANG_FILES` is defined a list of the values should be returned.
     """
     lang_files = langfiles_for_path("lib/l10n_utils/tests/test_files/" "extract_me_with_langfiles.py")
     eq_(lang_files, ["lebowski", "dude"])
Exemplo n.º 11
0
 def test_templ_lang_files_defined(self):
     """ If lang files are set, they should be returned. """
     lang_files = langfiles_for_path("lib/l10n_utils/tests/test_files/" "templates/some_lang_files.html")
     eq_(lang_files, ["dude", "walter", "main"])