[Zope3-checkins] CVS: Zope3/src/zope/app/applicationcontrol/browser/ftests - test_translationdomaincontrol.py:1.1

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Mar 23 10:52:06 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/applicationcontrol/browser/ftests
In directory cvs.zope.org:/tmp/cvs-serv1820/src/zope/app/applicationcontrol/browser/ftests

Added Files:
	test_translationdomaincontrol.py 
Log Message:


Get rid of useless adapter and do all the work in a view.




=== Added File Zope3/src/zope/app/applicationcontrol/browser/ftests/test_translationdomaincontrol.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Translation Domain Control Tests

$Id: test_translationdomaincontrol.py,v 1.1 2004/03/23 15:52:05 srichter Exp $
"""
import unittest
from zope.testing.functional import BrowserTestCase

class ZODBControlTest(BrowserTestCase):

    def testDomainOverview(self):
        response = self.publish(
            '/++etc++process/@@TranslationDomain.html',
            basic='mgr:mgrpw')

        body = response.getBody()
        self.checkForBrokenLinks(body,
                                 '/++etc++process/@@TranslationDomain.html',
                                 basic='mgr:mgrpw')
        
    def testReload(self):
        response = self.publish('/++etc++process/@@TranslationDomain.html',
                                basic='mgr:mgrpw',
                                form={'language': u'en',
                                      'domain': u'zope',
                                      'RELOAD': u'Reload'})
        body = response.getBody()
        self.assert_('Message Catalog successfully reloaded.' in body)


def test_suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(ZODBControlTest))
    return suite

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




More information about the Zope3-Checkins mailing list