Ejemplo n.º 1
0
 def getHtml(self, params={}):
     html = """
     <html>
     <head>
     {header}
     </head>
     <body id=\"{pageId}\">
     {body}
     </body>
     </html>
     """
     self.allParams = {}
     self.allParams.update(self.coreParams)
     self.allParams.update(params)
     Settings.updateParams(self.allParams)
     theHeader = self.getHtmlHeader()
     thePageId = self.pageId
     theBody = self.getHtmlBody()
     answer = Page.stripWhitespace(html.format(header=theHeader, pageId=thePageId, body=theBody))
     return answer
Ejemplo n.º 2
0
 def getHtml(self, params={}):
     html = """
     <html>
     <head>
     {header}
     </head>
     <body id=\"{pageId}\">
     {body}
     </body>
     </html>
     """
     self.allParams = {}
     self.allParams.update(self.coreParams)
     self.allParams.update(params)
     Settings.updateParams(self.allParams)
     theHeader = self.getHtmlHeader()
     thePageId = self.pageId
     theBody = self.getHtmlBody()
     answer = Page.stripWhitespace(
         html.format(header=theHeader, pageId=thePageId, body=theBody))
     return answer
Ejemplo n.º 3
0
 def testUpdateParamsSeasonSpecified(self):
     params = {"season": "10"}
     Settings.updateParams(params)
     Settings.setRootDirectory("/home/sehicl")
     self.assertEquals("/home/sehicl/data/2009-10.xml", params["xmlFile"])
Ejemplo n.º 4
0
 def testUpdateParamsNoSeasonSpecified(self):
     params = {}
     Settings.defaultSeason = 8
     Settings.setRootDirectory("/home/sehicl")
     Settings.updateParams(params)
     self.assertEquals("/home/sehicl/data/2007-08.xml", params["xmlFile"])
Ejemplo n.º 5
0
 def testUpdateParamsSeasonSpecified(self):
     params = {"season": "10"}
     Settings.updateParams(params)
     Settings.setRootDirectory("/home/sehicl")
     self.assertEquals("/home/sehicl/data/2009-10.xml", params["xmlFile"])
Ejemplo n.º 6
0
 def testUpdateParamsNoSeasonSpecified(self):
     params = {}
     Settings.defaultSeason = 8
     Settings.setRootDirectory("/home/sehicl")
     Settings.updateParams(params)
     self.assertEquals("/home/sehicl/data/2007-08.xml", params["xmlFile"])