Ignore:
Timestamp:
Aug 22, 2012 10:22:22 AM (8 years ago)
Author:
potar
Message:

Merged sitemap_date branch into trunk

Location:
quintagroup.plonegooglesitemaps/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonegooglesitemaps/trunk

    • Property svn:mergeinfo
      •  

        old new  
        33/quintagroup.plonegooglesitemaps/branches/migratioin_product:2826-2839 
        44/quintagroup.plonegooglesitemaps/branches/plone4:2549-2553 
         5/quintagroup.plonegooglesitemaps/branches/sitemap_date:3481-3509 
        56/quintagroup.plonegooglesitemaps/branches/test_refactoring:2527-2536 
  • quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/tests/testBlackoutList.py

    r3163 r3510  
    1616    def testDefaultId(self): 
    1717        idfilter = queryMultiAdapter((self.portal, self.app.REQUEST), 
    18                        IBlackoutFilter, name="id") 
     18                                     IBlackoutFilter, name="id") 
    1919        self.assertTrue(idfilter is not None, 
    20             "Not registered default 'id' IBlackoutFilter") 
     20                        "Not registered default 'id' IBlackoutFilter") 
    2121 
    2222    def testDefaultPath(self): 
    2323        pathfilter = queryMultiAdapter((self.portal, self.app.REQUEST), 
    24                          IBlackoutFilter, name="path") 
     24                                       IBlackoutFilter, name="path") 
    2525        self.assertTrue(pathfilter is not None, 
    26             "Not registered default 'path' IBlackoutFilter") 
     26                        "Not registered default 'path' IBlackoutFilter") 
    2727 
    2828 
     
    5959        catpaths, filtered = self.getPreparedLists("id", "doc1") 
    6060        self.assertTrue(type(filtered) in [ListType, TupleType], 
    61             'Object type, returned by filteredOut method of "id" filter '\ 
    62             'not list nor tuple') 
     61                        'Object type, returned by filteredOut method' 
     62                        ' of "id" filter ' 
     63                        'not list nor tuple') 
    6364        excluded = ["/%s/doc1" % self.portal.absolute_url(1), 
    6465                    "/%s/doc1" % self.folder.absolute_url(1)] 
    6566        self.assertTrue( 
    6667            set(catpaths) - set(filtered) == set(excluded), 
    67             'Wrong filtered-out by "id" filter:\nsrc %s\nres %s\nexcluded %s' \ 
     68            'Wrong filtered-out by "id" filter:\nsrc %s\nres %s\nexcluded %s' 
    6869            % (catpaths, filtered, excluded)) 
    6970 
     
    7172        catpaths, filtered = self.getPreparedLists("path", "/doc1") 
    7273        self.assertTrue(type(filtered) in [ListType, TupleType], 
    73             'Object type, returned by filteredOut method of "path" filter '\ 
    74             'not list nor tuple') 
     74                        'Object type, returned by filteredOut method' 
     75                        ' of "path" filter ' 
     76                        'not list nor tuple') 
    7577        excluded = ["/%s/doc1" % self.portal.absolute_url(1)] 
    7678        self.assertTrue( 
    7779            set(catpaths) - set(filtered) == set(excluded), 
    78             'Wrong filtered-out by "path" filter:\nsrc %s\nres %s\nexcluded ' \ 
     80            'Wrong filtered-out by "path" filter:\nsrc %s\nres %s\nexcluded ' 
    7981            '%s' % (catpaths, filtered, excluded)) 
    8082 
     
    8486        catpaths, filtered = self.getPreparedLists("path", "./doc1") 
    8587        self.assertTrue(type(filtered) in [ListType, TupleType], 
    86             'Object type, returned by filteredOut method of "path" utility '\ 
    87             'not list nor tuple') 
     88                        'Object type, returned by filteredOut method' 
     89                        ' of "path" utility ' 
     90                        'not list nor tuple') 
    8891        excluded = ["/%s/doc1" % self.folder.absolute_url(1)] 
    8992        self.assertTrue( 
    9093            set(catpaths) - set(filtered) == set(excluded), 
    91             'Wrong filtered-out by "path" filter:\nsrc %s\nres %s\nexcluded ' \ 
     94            'Wrong filtered-out by "path" filter:\nsrc %s\nres %s\nexcluded ' 
    9295            '%s' % (catpaths, filtered, excluded)) 
    9396 
     
    109112    def testGetNamedFilterUtility(self): 
    110113        catpaths, filtered = self.getPreparedLists("path:/doc1", "/plone/doc1") 
    111         excluded = ["%s/doc1" % self.portal.absolute_url()] 
     114        excluded = ["%s/doc1" % self.portal.absolute_url(), 
     115                    "%s/front-page" % self.portal.absolute_url()] 
    112116        self.assertTrue(set(catpaths) - set(filtered) == set(excluded), 
    113             'Wrong filtered-out by "id" filter:\nsrc %s\nres %s\nexcluded %s' \ 
    114             % (catpaths, filtered, excluded)) 
     117                        'Wrong filtered-out by' 
     118                        ' "id" filter:\nsrc %s\nres %s\nexcluded %s' 
     119                        % (catpaths, filtered, excluded)) 
    115120 
    116121    def testDefaultFilterUtility(self): 
    117122        catpaths, filtered = self.getPreparedLists("id:doc1", "doc1") 
    118123        excluded = ["%s/doc1" % self.portal.absolute_url(), 
     124                    "%s/front-page" % self.portal.absolute_url(), 
    119125                    "%s/doc1" % self.folder.absolute_url()] 
    120126        self.assertTrue(set(catpaths) - set(filtered) == set(excluded), 
    121             'Wrong filtered-out by "id" filter:\nsrc %s\nres %s\nexcluded %s' \ 
    122             % (catpaths, filtered, excluded)) 
     127                        'Wrong filtered-out by "id" ' 
     128                        'filter:\nsrc %s\nres %s\nexcluded %s' 
     129                        % (catpaths, filtered, excluded)) 
    123130        # Now check is output of unnamed filter samed to named one. 
    124131        self.sm.edit(blackout_list=["doc1", ]) 
     
    126133        map(lambda l: l.sort(), (filtered, filtered_dflt)) 
    127134        self.assertTrue(filtered == filtered_dflt, 
    128             'Output of named "id" filter is not same to unnamed one:\n' \ 
    129             'id-named: %s\nunnamed: %s' % (filtered, filtered_dflt)) 
     135                        'Output of named "id" filter ' 
     136                        'is not same to unnamed one:\n' 
     137                        'id-named: %s\nunnamed: %s' 
     138                        % (filtered, filtered_dflt)) 
    130139 
    131140    # def testGetCorrectFilterName(self): 
Note: See TracChangeset for help on using the changeset viewer.