Skip to content

Commit

Permalink
add a test that would at least have triggered a deprecation warning;
Browse files Browse the repository at this point in the history
the zope.app.i18n.browser.synchronize module is not otherwise imported
by the tests
  • Loading branch information
freddrake committed Oct 24, 2007
1 parent d1070c3 commit 227f62a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/zope/app/i18n/browser/synchronize.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@
import xmlrpclib
from base64 import encodestring

import zope.i18nmessageid

from zope.security.proxy import removeSecurityProxy

from zope.app.i18n.browser import BaseView
from zope.app.i18n import ZopeMessageFactory as _

_ = zope.i18nmessageid.MessageFactory("zope")

DEFAULT = 'http://localhost:8080/++etc++site/default/zope'

Expand Down
13 changes: 12 additions & 1 deletion src/zope/app/i18n/browser/tests/test_translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,21 @@ def testAddDeleteLanguage(self):
self.assert_('es' not in self._view.getAllLanguages())


class SynchronizeTest(unittest.TestCase):

def test_synchronize_imports(self):
# Trivial test that imports the module. This would have triggered a
# deprecation warning in previous versions.
import zope.app.i18n.browser.synchronize


def test_suite():
loader = unittest.TestLoader()
return loader.loadTestsFromTestCase(TranslateTest)
return unittest.TestSuite([
loader.loadTestsFromTestCase(TranslateTest),
loader.loadTestsFromTestCase(SynchronizeTest),
])
return

if __name__=='__main__':
unittest.main()

0 comments on commit 227f62a

Please sign in to comment.