Skip to content
Snippets Groups Projects
Commit 287fa947 authored by Philip Jenvey's avatar Philip Jenvey
Browse files

o move the babel plugin test template to test_htdocs

o update the babelplugin test for babel 0.9
parent 8fb982e3
No related branches found
No related tags found
No related merge requests found
......@@ -8,27 +8,26 @@ try:
class ExtractMakoTestCase(unittest.TestCase):
def test_extract(self):
mako_tmpl = open(os.path.join(os.path.dirname(__file__),
'templates', 'gettext.mako'))
mako_tmpl = open(os.path.join('test_htdocs', 'gettext.mako'))
messages = list(extract(mako_tmpl, {'_': None, 'gettext': None,
'ungettext': (1, 2)},
['TRANSLATOR:'], {}))
expected = \
[(1, u'_', 'Page arg 1', []),
(1, u'_', 'Page arg 2', []),
(10, u'gettext', 'Begin', []),
(14, u'_', 'Hi there!', [u'Hi there!']),
(19, u'_', 'Hello', []),
(22, u'_', 'Welcome', []),
(25, u'_', 'Yo', []),
(36, u'_', 'The', [u'Ensure so and', u'so, thanks']),
(36, u'ungettext', ('bunny', 'bunnies', ''), []),
(41, u'_', 'Goodbye', [u'Good bye']),
(44, u'_', 'Babel', []),
(45, u'ungettext', ('hella', 'hellas'), []),
(62, u'_', 'Goodbye, really!', [u'HTML comment']),
(65, u'_', 'P.S. byebye', []),
(71, u'_', 'Top', [])]
[(1, '_', u'Page arg 1', []),
(1, '_', u'Page arg 2', []),
(10, 'gettext', u'Begin', []),
(14, '_', u'Hi there!', [u'Hi there!']),
(19, '_', u'Hello', []),
(22, '_', u'Welcome', []),
(25, '_', u'Yo', []),
(36, '_', u'The', [u'Ensure so and', u'so, thanks']),
(36, 'ungettext', (u'bunny', u'bunnies', None), []),
(41, '_', u'Goodbye', [u'Good bye']),
(44, '_', u'Babel', []),
(45, 'ungettext', (u'hella', u'hellas', None), []),
(62, '_', u'Goodbye, really!', [u'HTML comment']),
(65, '_', u'P.S. byebye', []),
(71, '_', u'Top', [])]
self.assertEqual(expected, messages)
except ImportError:
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment