Mercurial > babel > old > mirror
changeset 421:cadc2f937a78
Testcase for fix of #148.
author | palgarvio |
---|---|
date | Tue, 16 Dec 2008 13:35:23 +0000 |
parents | b00041003734 |
children | 38feb97d4934 |
files | babel/messages/tests/catalog.py |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/babel/messages/tests/catalog.py +++ b/babel/messages/tests/catalog.py @@ -11,6 +11,8 @@ # individuals. For the exact contribution history, see the revision # history and logs, available at http://babel.edgewall.org/log/. +import copy +import datetime import doctest import unittest @@ -224,6 +226,20 @@ self.assertEqual(None, cat2['foo'].string) self.assertEqual(False, cat2['foo'].fuzzy) + + def test_update_po_updates_pot_creation_date(self): + template = catalog.Catalog() + localized_catalog = copy.deepcopy(template) + localized_catalog.locale = 'de_DE' + self.assertNotEqual(template.mime_headers, + localized_catalog.mime_headers) + self.assertEqual(template.creation_date, + localized_catalog.creation_date) + template.creation_date = datetime.datetime.now() - \ + datetime.timedelta(minutes=5) + localized_catalog.update(template) + self.assertEqual(template.creation_date, + localized_catalog.creation_date) def suite():