[kupu-checkins] r38539 - in kupu/trunk/kupu: doc plone/tests
hannosch at codespeak.net
hannosch at codespeak.net
Mon Feb 12 11:31:17 CET 2007
Author: hannosch
Date: Mon Feb 12 11:31:14 2007
New Revision: 38539
Modified:
kupu/trunk/kupu/doc/CHANGES.txt
kupu/trunk/kupu/doc/CREDITS.txt
kupu/trunk/kupu/plone/tests/test_browserSupportsKupu.py
kupu/trunk/kupu/plone/tests/test_links.py
kupu/trunk/kupu/plone/tests/test_plonedrawer.py
Log:
Adjusted some tests to work on Plone 3.0
Modified: kupu/trunk/kupu/doc/CHANGES.txt
==============================================================================
--- kupu/trunk/kupu/doc/CHANGES.txt (original)
+++ kupu/trunk/kupu/doc/CHANGES.txt Mon Feb 12 11:31:14 2007
@@ -4,6 +4,8 @@
- 1.4 (unreleased)
+ - Adjusted some Plone tests to work on Plone 3.0.
+
- Added 'remove table' button to table drawer and tool box.
- the uid/captioning transform now has a hook which gets called if
Modified: kupu/trunk/kupu/doc/CREDITS.txt
==============================================================================
--- kupu/trunk/kupu/doc/CREDITS.txt (original)
+++ kupu/trunk/kupu/doc/CREDITS.txt Mon Feb 12 11:31:14 2007
@@ -92,7 +92,7 @@
Translations
------------
-* Roman Joost and Carsten Senger - German
+* Roman Joost, Carsten Senger, Thomas Lotze and Hanno Schlichting - German
* Michiel Meeuwissen - Esperanto
@@ -159,6 +159,8 @@
- Danny Hope from Adaptive Technologies for help on icons.
+ - Hanno Schlichting for some bug fixing
+
Missing your name here?
-----------------------
Modified: kupu/trunk/kupu/plone/tests/test_browserSupportsKupu.py
==============================================================================
--- kupu/trunk/kupu/plone/tests/test_browserSupportsKupu.py (original)
+++ kupu/trunk/kupu/plone/tests/test_browserSupportsKupu.py Mon Feb 12 11:31:14 2007
@@ -18,50 +18,15 @@
execfile(os.path.join(sys.path[0], 'framework.py'))
from Testing import ZopeTestCase
-from Products.CMFPlone.tests import PloneTestCase
-from Products.CMFPlone.tests.PloneTestCase import portal_name, portal_owner
-from AccessControl.SecurityManagement import newSecurityManager, noSecurityManager
-try:
- import transaction
-except ImportError:
- class dummy:
- def get(self): return get_transaction()
- def commit(self): return self.get().commit()
- transaction = dummy()
-
-
-def installKupu(quiet=0):
- _start = time.time()
- if not quiet: ZopeTestCase._print('Adding Kupu ... ')
-
- ZopeTestCase.installProduct('kupu')
-
- # Install kupu into the test site. Done here because otherwise
- # it slows the tests down a lot on Plone 2.1
- app = ZopeTestCase.app()
- user = app.acl_users.getUserById(portal_owner).__of__(app.acl_users)
- newSecurityManager(None, user)
-
- portal = app[portal_name]
- quickinstaller = portal.portal_quickinstaller
- quickinstaller.installProduct('kupu')
-
- # Log out
- noSecurityManager()
- transaction.commit()
- if not quiet: ZopeTestCase._print('done (%.3fs)\n' \
- % (time.time()-_start,))
- ZopeTestCase.close(app)
+from Products.PloneTestCase import PloneTestCase
-installKupu()
+PloneTestCase.setupPloneSite(products=['kupu'])
class TestBrowserSupportsKupu(PloneTestCase.PloneTestCase):
def afterSetUp(self):
md = self.portal.portal_memberdata
md._updateProperty('wysiwyg_editor', 'Kupu')
- #self.qi = self.portal.portal_quickinstaller
- #self.qi.installProduct('kupu')
#self.script = self.portal.portal_skins.kupu_plone.browserSupportsKupu
self.script = self.portal.kupu_library_tool.isKupuEnabled
Modified: kupu/trunk/kupu/plone/tests/test_links.py
==============================================================================
--- kupu/trunk/kupu/plone/tests/test_links.py (original)
+++ kupu/trunk/kupu/plone/tests/test_links.py Mon Feb 12 11:31:14 2007
@@ -16,7 +16,12 @@
import Acquisition
from Testing.ZopeTestCase import ZopeTestCase, installProduct
from Products.CMFPlone.tests.PloneTestCase import portal_name, portal_owner
-from Products.Archetypes.tests import ArchetypesTestCase
+try:
+ from Products.Archetypes.tests.atsitetestcase import ATSiteTestCase
+except ImportError:
+ from Products.Archetypes.tests.ArchetypesTestCase import \
+ ArcheSiteTestCase as ATSiteTestCase
+
from AccessControl.SecurityManagement import newSecurityManager
try:
from Products.ATContentTypes.lib import constraintypes
@@ -56,7 +61,7 @@
def MapType(typename):
return TypeMapping[typename]
-class TestLinkCode(ArchetypesTestCase.ArcheSiteTestCase):
+class TestLinkCode(ATSiteTestCase):
"""Test the link checking code"""
def afterSetUp(self):
Modified: kupu/trunk/kupu/plone/tests/test_plonedrawer.py
==============================================================================
--- kupu/trunk/kupu/plone/tests/test_plonedrawer.py (original)
+++ kupu/trunk/kupu/plone/tests/test_plonedrawer.py Mon Feb 12 11:31:14 2007
@@ -19,11 +19,16 @@
import Acquisition
from Testing.ZopeTestCase import ZopeTestCase, installProduct
from Products.CMFPlone.tests.PloneTestCase import portal_name, portal_owner
-from Products.Archetypes.tests import ArchetypesTestCase
+try:
+ from Products.Archetypes.tests.atsitetestcase import ATSiteTestCase
+except ImportError:
+ from Products.Archetypes.tests.ArchetypesTestCase import \
+ ArcheSiteTestCase as ATSiteTestCase
+
from AccessControl.SecurityManagement import newSecurityManager
try:
from Products.ATContentTypes.lib import constraintypes
-except:
+except ImportError:
constraintypes = None
from Products.kupu.plone.tests import TestContent
@@ -58,7 +63,7 @@
def MapType(typename):
return TypeMapping[typename]
-class TestPloneDrawer(ArchetypesTestCase.ArcheSiteTestCase):
+class TestPloneDrawer(ATSiteTestCase):
"""Test the implementation of the PloneDrawer class"""
def afterSetUp(self):
More information about the kupu-checkins
mailing list