Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
############################################################################## | ||
# | ||
# 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.1 (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$ | ||
""" | ||
import unittest | ||
from zope.app.testing.functional import BrowserTestCase | ||
|
||
class ZODBControlTest(BrowserTestCase): | ||
|
||
def testDomainOverview(self): | ||
response = self.publish( | ||
'/++etc++process/@@TranslationDomain.html', | ||
basic='globalmgr:globalmgrpw') | ||
|
||
body = response.getBody() | ||
self.checkForBrokenLinks(body, | ||
'/++etc++process/@@TranslationDomain.html', | ||
basic='globalmgr:globalmgrpw') | ||
|
||
def testReload(self): | ||
response = self.publish('/++etc++process/@@TranslationDomain.html', | ||
basic='globalmgr:globalmgrpw', | ||
form={'language': u'de', | ||
'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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
############################################################################## | ||
# | ||
# 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.1 (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. | ||
# | ||
############################################################################## | ||
"""ZODB Control Tests | ||
$Id$ | ||
""" | ||
import unittest | ||
|
||
from zope.app.testing.functional import BrowserTestCase | ||
|
||
|
||
class ZODBControlTest(BrowserTestCase): | ||
|
||
def testZODBControlOverview(self): | ||
response = self.publish('/++etc++process/@@ZODBControl.html', | ||
basic='globalmgr:globalmgrpw', | ||
form={'days': u'3'}) | ||
body = response.getBody() | ||
self.assert_('value="3"' in body) | ||
self.assert_('<em>Demo Storage</em>' in body) | ||
self.assert_('<em>100 Bytes</em>' in body) | ||
|
||
|
||
def test_suite(): | ||
suite = unittest.TestSuite() | ||
suite.addTest(unittest.makeSuite(ZODBControlTest)) | ||
return suite | ||
|
||
if __name__=='__main__': | ||
unittest.main(defaultTest='test_suite') |