description : "Your's site description" title : 'A Makina Plone site' default_page : 'front-page' enable_permalink : False validate_email : True selectable_views : (u'folder_listing', u'news_listing') email_charset : 'utf-8' """ site_props = {} props_file = None try: if not xml_file: xml_file = os.path.join(os.path.dirname(__file__), 'xml_doctests', 'site_properties.xml') props_file = open(xml_file) site_properties = minidom.parse(props_file) except Exception, e: print "something wrong loading site properties xml file" if props_file: props_file.close() site = site_properties.documentElement site_props = getProperties(site) return site_props if __name__ == "__main__": import doctest OPTIONS = doctest.REPORT_ONLY_FIRST_FAILURE | doctest.ELLIPSIS |\ doctest.NORMALIZE_WHITESPACE doctest.testmod(verbose=True, optionflags=OPTIONS)
""" navtree_props = {} site_props = {} props_file = None try: if not xml_file: xml_file = os.path.join(os.path.dirname(__file__), 'xml_doctests', 'propertiestool.xml') props_file = open(xml_file) tools_properties = minidom.parse(props_file) except Exception, e: print "something wrong loading portal properties xml file" if props_file: props_file.close() objects = tools_properties.getElementsByTagName('object') for obj in objects : if obj.attributes['name'].nodeValue == 'navtree_properties': navtree_props = getProperties(obj) if obj.attributes['name'].nodeValue == 'site_properties': site_props = getProperties(obj) return (navtree_props, site_props) if __name__ == "__main__": import doctest OPTIONS = doctest.REPORT_ONLY_FIRST_FAILURE | doctest.ELLIPSIS |\ doctest.NORMALIZE_WHITESPACE doctest.testmod(verbose=True, optionflags=OPTIONS)