Changeset 3547 in products for quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/tests/testConfiglet.py
- Timestamp:
- Sep 11, 2012 7:30:25 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/tests/testConfiglet.py
r3140 r3547 16 16 self.loginAsPortalOwner() 17 17 self.save_url = self.portal.id + '/@@seo-controlpanel?' \ 18 'form.actions.save=1&_authenticator=%s' \ 19 % self._getauth() 18 'form.actions.save=1&_authenticator=%s' % self._getauth() 20 19 21 20 def test_exposeDCMetaTags_On(self): … … 26 25 def test_exposeDCMetaTags_Off(self): 27 26 self.publish(self.save_url + '&form.exposeDCMetaTags=', 28 self.basic_auth)27 self.basic_auth) 29 28 self.assertTrue(not self.sp.exposeDCMetaTags) 30 29 … … 36 35 37 36 dcm = self.seo.getProperty("default_custom_metatags", ()) 38 self.assertTrue(dcm == expect, '"default_custom_metatags" property ' \37 self.assertTrue(dcm == expect, '"default_custom_metatags" property ' 39 38 'contains: "%s", must: "%s"' % (dcm, expect)) 40 39 … … 46 45 47 46 dcm = self.seo.getProperty("default_custom_metatags", ()) 48 self.assertTrue(dcm == (), '"default_custom_metatags" property ' \47 self.assertTrue(dcm == (), '"default_custom_metatags" property ' 49 48 'contains: "%s", must be empty"' % str(dcm)) 50 49 … … 56 55 57 56 mo = self.seo.getProperty("metatags_order", ()) 58 self.assertTrue(mo == expect, '"metatags_order" property ' \57 self.assertTrue(mo == expect, '"metatags_order" property ' 59 58 'contains: "%s", must: "%s"' % (mo, expect)) 60 59 … … 66 65 67 66 mo = self.seo.getProperty("metatags_order", ()) 68 self.assertTrue(mo == (), '"metatags_order" property ' \67 self.assertTrue(mo == (), '"metatags_order" property ' 69 68 'contains: "%s", must be empty"' % str(mo)) 70 69 … … 75 74 tse = self.seo.getProperty("content_types_with_seoproperties", ()) 76 75 self.assertTrue(tse == (expect,), 77 '"content_types_with_seoproperties" property ' \76 '"content_types_with_seoproperties" property ' 78 77 'contains:" %s", must: "%s"' % (tse, expect)) 79 78 80 79 def test_typesSEOEnabled_Off(self): 81 80 self.publish(self.save_url + '&form.types_seo_enabled-empty-marker=1', 82 self.basic_auth)81 self.basic_auth) 83 82 84 83 tse = self.seo.getProperty("content_types_with_seoproperties", ()) 85 self.assertTrue(tse == (), '"content_types_with_seoproperties" ' \84 self.assertTrue(tse == (), '"content_types_with_seoproperties" ' 86 85 'property contains: "%s", must be empty"' % str(tse)) 87 86 … … 90 89 91 90 self.publish(self.save_url + '&form.custom_script=%s' % expect, 92 self.basic_auth)91 self.basic_auth) 93 92 94 93 cs = self.seo.getProperty("custom_script", "") 95 self.assertTrue(cs == expect, '"custom_script" property ' \96 'contains: "%s", but "%s" must be"' % (cs, expect))94 self.assertTrue(cs == expect, '"custom_script" property ' 95 'contains: "%s", but "%s" must be"' % (cs, expect)) 97 96 98 97 def test_CustomScriptDel(self): 99 98 self.publish(self.save_url + '&form.custom_script=', 100 self.basic_auth)99 self.basic_auth) 101 100 102 101 cs = self.seo.getProperty("custom_script", "") 103 self.assertTrue(cs == "", '"custom_script" property ' \104 'contains: "%s", must be empty"' % cs)102 self.assertTrue(cs == "", '"custom_script" property ' 103 'contains: "%s", must be empty"' % cs) 105 104 106 105 def test_fieldsAdd(self): … … 111 110 112 111 f = self.seo.getProperty("fields", ()) 113 self.assertTrue(f == expect, '"fields" property ' \114 'contains: "%s", must: "%s"' % (f, expect))112 self.assertTrue(f == expect, '"fields" property ' 113 'contains: "%s", must: "%s"' % (f, expect)) 115 114 116 115 def test_fieldsDel(self): … … 121 120 122 121 f = self.seo.getProperty("fields", ()) 123 self.assertTrue(f == (), '"fields" property ' \122 self.assertTrue(f == (), '"fields" property ' 124 123 'contains: "%s", must be empty"' % str(f)) 125 124 … … 131 130 132 131 f = self.seo.getProperty("stop_words", ()) 133 self.assertTrue(f == expect, '"stop_words" property ' \132 self.assertTrue(f == expect, '"stop_words" property ' 134 133 'contains: "%s", must: "%s"' % (f, expect)) 135 134 … … 141 140 142 141 f = self.seo.getProperty("stop_words", ()) 143 self.assertTrue(f == (), '"stop_words" property ' \142 self.assertTrue(f == (), '"stop_words" property ' 144 143 'contains: "%s", must be empty"' % str(f)) 145 144 … … 148 147 ffield = fields.get("external_keywords_test") 149 148 self.assertTrue(ffield is not None, 150 'Not found "external_keywords_test" field in ' \149 'Not found "external_keywords_test" field in ' 151 150 'ISEOConfigletSchema interface') 152 151 self.assertTrue(IBool.providedBy(ffield.field), 153 152 '"external_keywords_test" is not boolean type field') 154 self.assertTrue(ffield.field.default ==False,155 '"external_keywords_test" field default value ' \153 self.assertTrue(ffield.field.default is False, 154 '"external_keywords_test" field default value ' 156 155 'is not set to False') 157 156 … … 163 162 def test_externalKeyword_Off(self): 164 163 self.publish(self.save_url + '&form.external_keywords_test=', 165 self.basic_auth)164 self.basic_auth) 166 165 self.assertTrue(not self.seo.external_keywords_test) 167 166
Note: See TracChangeset
for help on using the changeset viewer.