Changeset 2412 in products


Ignore:
Timestamp:
May 31, 2010 3:11:53 PM (10 years ago)
Author:
mylan
Message:

#131: Remove needless add/remove news-sitemaps related schema adapter registration methods

Location:
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/tests/testNewsSitemaps.py

    r2410 r2412  
    9797from Products.ATContentTypes.interface import IATNewsItem 
    9898from quintagroup.plonegooglesitemaps.content.newsextender import NewsExtender 
    99 from quintagroup.plonegooglesitemaps.utils import addLocalSchemaExtenderAdapter 
    100 from quintagroup.plonegooglesitemaps.utils import removeLocalSchemaExtenderAdapter 
    10199 
    102100class TestSchemaExtending(TestCase): 
  • quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/utils.py

    r2401 r2412  
    11from urllib2 import urlopen 
    22from urllib  import quote as urlquote 
    3  
    4 from zope.component import getSiteManager 
    53 
    64from Globals import DevelopmentMode 
     
    86 
    97from quintagroup.plonegooglesitemaps import config 
    10 from quintagroup.plonegooglesitemaps.content.newsextender import NewsExtender 
    118 
    129def ping_google(url, sitemap_id): 
     
    2724 
    2825    return 0 
    29  
    30 def addLocalSchemaExtenderAdapter(context, iface): 
    31     """Register SchemaExtender adapter in 
    32        Local SiteManager for specified interface. 
    33     """ 
    34     sm = getSiteManager(context) 
    35     sm.registerAdapter(factory=NewsExtender, required=(iface,)) 
    36  
    37 def removeLocalSchemaExtenderAdapter(context, iface): 
    38     """Unregister SchemaExtender adapter in 
    39        Local SiteManager for specified interface. 
    40     """ 
    41     sm = getSiteManager(context) 
    42     sm.unregisterAdapter(factory=NewsExtender, required=(iface,)) 
Note: See TracChangeset for help on using the changeset viewer.