Changeset 2382 in products
- Timestamp:
- May 25, 2010 5:20:14 PM (14 years ago)
- Location:
- quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/tests
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/tests/testqPloneGoogleSitemaps.py
r2170 r2382 3 3 # 4 4 5 import re, sys 6 from urllib import urlencode 7 from StringIO import StringIO 8 import unittest 9 10 from zope.testing import doctestunit 11 from zope.component import testing 12 from Testing import ZopeTestCase as ztc 13 14 from Products.Five import zcml 15 from Products.Five import fiveconfigure 16 17 from Products.PloneTestCase import PloneTestCase as ptc 18 from Products.PloneTestCase.layer import PloneSite 5 from base import * 19 6 from Products.CMFPlone.utils import _createObjectByType 20 21 from XMLParser import parse, hasURL22 23 import quintagroup.plonegooglesitemaps24 from quintagroup.plonegooglesitemaps.config import ping_googlesitemap25 26 quintagroup.plonegooglesitemaps.config.testing = 127 quintagroup.plonegooglesitemaps.config.UPDATE_CATALOG = True28 29 30 class MixinTestCase:31 """ Define layer and common afterSetup method with package installation.32 Package installation on plone site setup impossible because of33 five's registerPackage directive not recognized on module initializing.34 """35 layer = PloneSite36 37 def afterSetUp(self):38 self.loginAsPortalOwner()39 40 41 class TestCase(MixinTestCase, ptc.PloneTestCase):42 """ For unit tests """43 44 class FunctionalTestCase(MixinTestCase, ptc.FunctionalTestCase):45 """ For functional tests """46 47 # Initialize all needed zcml directives48 fiveconfigure.debug_mode = True49 from Products import Five, CMFCore, GenericSetup50 zcml.load_config('meta.zcml', Five)51 zcml.load_config('meta.zcml', CMFCore)52 zcml.load_config('meta.zcml', GenericSetup)53 zcml.load_config('permissions.zcml', Five)54 55 # Force quintagroup.plonegooglesitemaps zcml initialization56 zcml.load_config('configure.zcml', quintagroup.plonegooglesitemaps)57 zcml.load_config('overrides.zcml', quintagroup.plonegooglesitemaps)58 fiveconfigure.debug_mode = False59 60 # Install quintagroup.plonegooglesitemaps package and Plone site61 # with the default profile for the package62 PRODUCT = 'quintagroup.plonegooglesitemaps'63 ptc.installPackage(PRODUCT)64 ptc.setupPloneSite( extension_profiles=("%s:default" % PRODUCT,))65 66 7 67 8 class TestGoogleSitemapsInstallation(TestCase):
Note: See TracChangeset
for help on using the changeset viewer.