File indexing completed on 2024-12-01 13:47:55
0001 import os 0002 0003 from pology.catalog import Catalog 0004 from pology.message import Message 0005 0006 0007 TEMPLATE_FILEPATH = os.path.join( 0008 os.path.dirname(__file__), "files", "template.pot") 0009 0010 0011 def test_template_load(): 0012 catalog = Catalog(TEMPLATE_FILEPATH) 0013 message_iterator = iter(catalog) 0014 actual = list(message_iterator) 0015 expected = [ 0016 Message({ 0017 "source": [['some/path', 123]], 0018 "refline": 14, 0019 "refentry": 1, 0020 "msgid": "Source string", 0021 "msgstr": [""], 0022 }) 0023 ] 0024 assert actual == expected