[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/onlinehelp/ -
Correct path to 'welcome.stx'
Baiju M
baiju.m.mail at gmail.com
Wed Mar 28 07:13:15 EDT 2007
Log message for revision 73844:
- Correct path to 'welcome.stx'
- move ftests.py to tests.py
Changed:
U Zope3/trunk/src/zope/app/onlinehelp/__init__.py
D Zope3/trunk/src/zope/app/onlinehelp/browser/ftests.py
A Zope3/trunk/src/zope/app/onlinehelp/browser/tests.py
-=-
Modified: Zope3/trunk/src/zope/app/onlinehelp/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/onlinehelp/__init__.py 2007-03-28 11:12:37 UTC (rev 73843)
+++ Zope3/trunk/src/zope/app/onlinehelp/__init__.py 2007-03-28 11:13:14 UTC (rev 73844)
@@ -31,8 +31,8 @@
# Global Online Help Instance
-path = os.path.join(os.path.dirname(zope.app.__file__),
- 'onlinehelp', 'help', 'welcome.stx')
+path = os.path.join(os.path.dirname(__file__),
+ 'help', 'welcome.stx')
globalhelp = OnlineHelp('Online Help', path)
Deleted: Zope3/trunk/src/zope/app/onlinehelp/browser/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/onlinehelp/browser/ftests.py 2007-03-28 11:12:37 UTC (rev 73843)
+++ Zope3/trunk/src/zope/app/onlinehelp/browser/ftests.py 2007-03-28 11:13:14 UTC (rev 73844)
@@ -1,90 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2004 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.
-#
-##############################################################################
-"""Functional Tests for Onlinehelp
-
-$Id$
-"""
-import os
-import transaction
-import unittest
-
-from zope.app.folder.interfaces import IRootFolder
-from zope.app.file import File
-from zope.app.testing.functional import BrowserTestCase
-from zope.app.onlinehelp.tests.test_onlinehelp import testdir
-from zope.app.onlinehelp import globalhelp
-from zope.app.onlinehelp.testing import OnlineHelpLayer
-
-class Test(BrowserTestCase):
-
- def test_contexthelp(self):
- path = os.path.join(testdir(), 'help.txt')
- globalhelp.registerHelpTopic('help', 'Help', '', path, IRootFolder)
- path = os.path.join(testdir(), 'help2.txt')
- globalhelp.registerHelpTopic('help2', 'Help2', '', path, IRootFolder,
- 'contents.html')
-
- transaction.commit()
-
- response = self.publish("/+/action.html", basic='mgr:mgrpw',
- form={'type_name':u'zope.app.content.File',
- 'id':u'file'})
-
- self.assertEqual(response.getStatus(), 302)
-
- response = self.publish('/contents.html', basic='mgr:mgrpw')
-
- self.assertEqual(response.getStatus(), 200)
- body = ' '.join(response.getBody().split())
- self.assert_(body.find(
- "javascript:popup('contents.html/++help++/@@contexthelp.html") >= 0)
-
- response = self.publish(
- '/contents.html/++help++/@@contexthelp.html', basic='mgr:mgrpw')
-
- self.assertEqual(response.getStatus(), 200)
- body = ' '.join(response.getBody().split())
- self.assert_(body.find("This is another help!") >= 0)
-
- response = self.publish('/index.html/++help++/@@contexthelp.html',
- basic='mgr:mgrpw')
-
- self.assertEqual(response.getStatus(), 200)
- body = ' '.join(response.getBody().split())
- self.assert_(body.find("This is a help!") >= 0)
-
- response = self.publish('/file/edit.html/++help++/@@contexthelp.html',
- basic='mgr:mgrpw')
-
- self.assertEqual(response.getStatus(), 200)
- body = ' '.join(response.getBody().split())
- self.assert_(body.find(
- "Welcome to the Zope 3 Online Help System.") >= 0)
-
- path = '/contents.html/++help++'
- response = self.publish(path, basic='mgr:mgrpw')
-
- self.assertEqual(response.getStatus(), 200)
- body = ' '.join(response.getBody().split())
- self.assert_(body.find("Topics") >= 0)
-
- self.checkForBrokenLinks(body, path, basic='mgr:mgrpw')
-
-
-def test_suite():
- Test.layer = OnlineHelpLayer
- return unittest.makeSuite(Test)
-
-if __name__ == '__main__':
- unittest.main()
Copied: Zope3/trunk/src/zope/app/onlinehelp/browser/tests.py (from rev 73835, Zope3/trunk/src/zope/app/onlinehelp/browser/ftests.py)
More information about the Zope3-Checkins
mailing list