def test_state_token(self): # It's shouldn't possible to set these odd values anymore, but lets # ensure they are escaped! html = str(utils.state_token('<script>alert(1)</script>')) assert '<script>alert(1)</script>' in html assert '<script>alert(1)</script>' not in html
def test_state_token(self): # It's shouldn't possible to set these odd values anymore, but lets # ensure they are escaped! html = str(utils.state_token('<script>alert(1)</script>')) self.assertIn( '<script>alert(1)</script>', html, ) self.assertNotIn( '<script>alert(1)</script>', html, )