def test_id_escape_issue(): f = Form(Textbox("x", id="x <unsafe>")) assert "<unsafe>" not in f.render() assert "<unsafe>" not in f.render_css()
def test_id_escape_issue(self): f = Form(Textbox("x", id="x <unsafe>")) self.assertTrue("<unsafe>" not in f.render()) self.assertTrue("<unsafe>" not in f.render_css())