Changeset 3003 in products
- Timestamp:
- Nov 11, 2010 7:24:30 PM (13 years ago)
- Location:
- quintagroup.analytics/trunk/quintagroup/analytics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.analytics/trunk/quintagroup/analytics/configure.zcml
r2893 r3003 5 5 i18n_domain="quintagroup.analytics"> 6 6 7 <!-- make plone site object traversable --> 8 <!--five:traversable 9 class="Products.CMFPlone.Portal.PloneSite" 10 /--> 11 12 <include package=".browser" /> 7 <include package=".browser" /> 13 8 14 9 <genericsetup:registerProfile -
quintagroup.analytics/trunk/quintagroup/analytics/tests.py
r2870 r3003 1 1 import unittest 2 import transaction 2 3 3 from zope.testing import doctestunit4 4 from zope.component import testing 5 5 from Testing import ZopeTestCase as ztc … … 8 8 from Products.Five import fiveconfigure 9 9 from Products.PloneTestCase import PloneTestCase as ptc 10 from Products.PloneTestCase import setup as ptc_setup 10 11 from Products.PloneTestCase.layer import PloneSite 12 import quintagroup.analytics 11 13 ptc.setupPloneSite() 12 13 import quintagroup.contentstats14 14 15 15 class TestCase(ptc.PloneTestCase): … … 19 19 fiveconfigure.debug_mode = True 20 20 zcml.load_config('configure.zcml', 21 quintagroup. contentstats)21 quintagroup.analytics) 22 22 fiveconfigure.debug_mode = False 23 ztc.installPackage('quintagroup.analytics') 24 app = ztc.app() 25 portal = app[ptc_setup.portal_name] 26 27 # Sets the local site/manager 28 ptc_setup._placefulSetUp(portal) 29 30 qi = getattr(portal, 'portal_quickinstaller', None) 31 qi.installProduct('quintagroup.analytics') 32 transaction.commit() 23 33 24 34 @classmethod … … 27 37 28 38 39 #TO DO:===================================================================== 40 # add test to verify if QA control panel action is present; 41 # add tests for views registration; 42 # add tests for every views methods; 43 # add doc tests to validate if all needed elements are present on page; 44 45 46 47 class TestQAInstallation(TestCase): 48 """ This class veryfies registrations of all needed views and 49 actions. 50 """ 51 52 def test_cp_action_installation(self): 53 """Here we are testin control panel action. """ 54 control_panel = self.portal.portal_controlpanel 55 self.assert_('QAnalytics' in [a.id for a in control_panel.listActions()], 56 "Configlet for quintagroup.analitycs isn't registered.") 57 58 29 59 def test_suite(): 30 return unittest.TestSuite([ 60 from unittest import TestSuite, makeSuite 61 62 test_suite = unittest.TestSuite([ 31 63 32 64 # Unit tests … … 51 83 ]) 52 84 85 test_suite.addTest(makeSuite(TestQAInstallation)) 86 return test_suite 87 53 88 if __name__ == '__main__': 54 89 unittest.main(defaultTest='test_suite')
Note: See TracChangeset
for help on using the changeset viewer.