Ignore:
Timestamp:
Mar 11, 2010 2:00:57 PM (14 years ago)
Author:
mylan
Message:

#161: Remove canonical url tests from testResponce - it's tested in testCanonicalURL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testResponse.py

    r1877 r1887  
    3535        my_doc = self.portal.invokeFactory('Document', id='my_doc') 
    3636        my_doc = self.portal['my_doc'] 
    37         self.canonurl = 'http://nohost/plone/test.html' 
    3837        self.sp.manage_changeProperties(**GLOBAL_CUSTOM_METATAGS) 
    3938        self.sp.manage_changeProperties(settings_use_keywords_sg=3, settings_use_keywords_lg=2) 
    4039        abs_path = "/%s" % my_doc.absolute_url(1) 
    4140        self.form_data = {'seo_description': 'it is description, test keyword1', 'seo_keywords_override:int': 1, 'seo_custommetatags_override:int': 1, 
    42                         'seo_robots_override:int': 1, 'seo_robots': 'ALL', 'seo_description_override:int': 1, 'seo_canonical_override:int': 1, 
     41                        'seo_robots_override:int': 1, 'seo_robots': 'ALL', 'seo_description_override:int': 1, 
    4342                        'seo_keywords:list': 'keyword1', 'seo_html_comment': 'no comments', 
    4443                        'seo_title_override:int': 1, 'seo_title': 'hello world', 'seo_html_comment_override:int': 1, 
    45                         'seo_distribution_override:int': 1, 'seo_distribution': 'Global', 'seo_canonical': self.canonurl, 'form.submitted:int': 1} 
     44                        'seo_distribution_override:int': 1, 'seo_distribution': 'Global', 'form.submitted:int': 1} 
    4645        st = '' 
    4746        for d in CUSTOM_METATAGS: 
     
    135134        self.assert_(m, "Global custom meta tag %s not applied." % 'metatag1') 
    136135 
    137     def testCanonical(self): 
    138         m = re.match('.*<link rel="canonical" href="%s" />' % self.canonurl, self.html, re.S|re.M) 
    139         self.assert_(m, self.canonurl) 
    140  
    141     def testDefaultCanonical(self): 
    142         """Default canonical url mast add document absolute_url 
    143         """ 
    144         # Delete custom canonical url 
    145         my_doc = self.portal['my_doc'] 
    146         my_doc._delProperty(id='qSEO_canonical') 
    147         # Get document without customized canonical url 
    148         abs_path = "/%s" % my_doc.absolute_url(1) 
    149         self.html = self.publish(abs_path, self.basic_auth).getBody() 
    150  
    151         my_url = my_doc.absolute_url() 
    152         m = re.match('.*<link rel="canonical" href="%s" />' % my_url, self.html, re.S|re.M) 
    153         self.assert_(m, my_url) 
    154  
    155136def test_suite(): 
    156137    from unittest import TestSuite, makeSuite 
Note: See TracChangeset for help on using the changeset viewer.