Changeset 1895 in products
- Timestamp:
- Mar 11, 2010 8:25:05 PM (14 years ago)
- Location:
- quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/browser.txt
r1849 r1895 53 53 =============================== 54 54 55 >>> self.qi = self.portal.portal_quickinstaller 56 >>> self.sp = self.portal.portal_properties.seo_properties 57 >>> self.object_tabs = self.portal.portal_actions.object 58 >>> self.ps = self.portal.portal_setup 55 Define some general objects: 59 56 60 First uninstall product, if it is already installed: 57 >>> qi = self.portal.portal_quickinstaller 58 >>> object_tabs = self.portal.portal_actions.object 59 >>> ps = self.portal.portal_setup 61 60 62 >>> from quintagroup.seoptimizer.config import PROJECT_NAME 63 >>> if self.qi.isProductInstalled(PROJECT_NAME): 64 ... self.qi.uninstallProducts([PROJECT_NAME,]) 65 66 67 Test installation 'SEO Properties' action 61 Test is 'SEO Properties' action present for a Page before 62 seoptimizer installed 68 63 69 64 >>> browser.open('http://nohost/plone/front-page') 70 65 >>> "SEO Properties" in browser.contents 71 66 False 72 >>> self.qi.installProduct(PROJECT_NAME) 67 68 Now install the product for following testing, and add 69 70 >>> qi.installProduct(PROJECT_NAME) 73 71 'Ran all install steps.' 74 >>> self.portal.portal_actions.object.get('SEOProperties', None) is not None 72 >>> sp = self.portal.portal_properties.seo_properties 73 74 And check is SEOProperties added to object tabs 75 76 >>> object_tabs.get('SEOProperties', None) is not None 75 77 True 76 78 77 79 Test visibility 'SEO Properties' action after installation 78 80 79 >>> s elf.sp.content_types_with_seoproperties = ('Document',)81 >>> sp.content_types_with_seoproperties = ('Document',) 80 82 >>> browser.open('http://nohost/plone/front-page') 81 83 >>> "SEO Properties" in browser.contents … … 86 88 Test invisibility 'SEO Properties' action after installation 87 89 88 >>> s elf.sp.content_types_with_seoproperties = ('File',)90 >>> sp.content_types_with_seoproperties = ('File',) 89 91 >>> browser.open('http://nohost/plone/front-page') 90 92 >>> "SEO Properties" in browser.contents … … 97 99 >>> "SEO Properties" in browser.contents 98 100 False 99 >>> self.ps.setLastVersionForProfile('quintagroup.seoptimizer:default', '2.0.0')100 >>> self.qi.reinstallProducts((PROJECT_NAME,))101 >>> ps.setLastVersionForProfile('quintagroup.seoptimizer:default', '2.0.0') 102 >>> qi.reinstallProducts((PROJECT_NAME,)) 101 103 >>> self.portal.portal_actions.object.get('SEOProperties', None) is not None 102 104 True … … 104 106 Test visibility 'SEO Properties' action after reinstallation 105 107 106 >>> s elf.sp.content_types_with_seoproperties = ('Document',)108 >>> sp.content_types_with_seoproperties = ('Document',) 107 109 >>> browser.open('http://nohost/plone/front-page') 108 110 >>> "SEO Properties" in browser.contents … … 113 115 Test invisibility 'SEO Properties' action after reinstallation 114 116 115 >>> s elf.sp.content_types_with_seoproperties = ('File',)117 >>> sp.content_types_with_seoproperties = ('File',) 116 118 >>> browser.open('http://nohost/plone/front-page') 117 119 >>> "SEO Properties" in browser.contents … … 120 122 Test uninstallation 'SEO Properties' action 121 123 122 >>> s elf.sp.content_types_with_seoproperties = ('Document',)124 >>> sp.content_types_with_seoproperties = ('Document',) 123 125 >>> browser.open('http://nohost/plone/front-page') 124 126 >>> "SEO Properties" in browser.contents 125 127 True 126 >>> self.qi.uninstallProducts((PROJECT_NAME,))127 >>> self.portal.portal_actions.object.get('SEOProperties', None) is not None128 >>> qi.uninstallProducts((PROJECT_NAME,)) 129 >>> object_tabs.get('SEOProperties', None) is not None 128 130 False 129 131 130 132 Test visibility 'SEO Properties' action after uninstallation 131 133 132 >>> s elf.sp.content_types_with_seoproperties = ('Document',)134 >>> sp.content_types_with_seoproperties = ('Document',) 133 135 >>> browser.open('http://nohost/plone/front-page') 134 136 >>> "SEO Properties" in browser.contents -
quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/test_doctest.py
r1834 r1895 5 5 from zope.component import testing, eventtesting 6 6 7 from Testing import ZopeTestCase as ztc 8 9 from quintagroup.seoptimizer.tests import base 7 from base import * 10 8 11 9 def test_suite(): … … 15 13 ztc.FunctionalDocFileSuite( 16 14 'browser.txt', package='quintagroup.seoptimizer.tests', 17 test_class= base.FunctionalTestCase,15 test_class=FunctionalTestCaseNotInstalled, globs=globals(), 18 16 optionflags=doctest.REPORT_ONLY_FIRST_FAILURE | 19 17 doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS),
Note: See TracChangeset
for help on using the changeset viewer.