Ejemplo n.º 1
0
 def test_it_escapes_bracket_slash(self):
     expected = rb'{"xss":"<\/script>"}'
     actual = api_utils.JSONRenderer().render({'xss': '</script>'})
     eq_(expected, actual)
Ejemplo n.º 2
0
 def test_it_works(self):
     expected = b'{"foo":"bar"}'
     actual = api_utils.JSONRenderer().render({'foo': 'bar'})
     eq_(expected, actual)