Exemplo n.º 1
0
 def run_jssource(self):
     if self.server.source:
         source = self.server.source
     else:
         source = support.js_source([setup_page])
         self.server.source = source
     self.serve_data("text/javascript", source)
Exemplo n.º 2
0
 def run_jssource(self):
     if self.server.source:
         source = self.server.source
     else:
         source = support.js_source([setup_page])
         self.server.source = source
     self.serve_data("text/javascript", source)
Exemplo n.º 3
0
 def test_escape_html(self):
     def x():
         escapeHTML("xxx") + "xxx"
     assert js_source([x], use_pdb=False).find("escapeHTML (") != -1
Exemplo n.º 4
0
 def test_serialize_json(self):
     def x():
         return serializeJSON(3) + serializeJSON("aaa") + serializeJSON([1])
     assert js_source([x])