'Test dump_js_escaped_json properly escapes &, <, and >.'

def test_dump_js_escaped_json_escapes_unsafe_html(self):

    malicious_dict = {"</script><script>alert('hello,    ');</script>": "</script><script>alert('&world!');</script>"}
    expected_escaped_json = '{"\\u003c/script\\u003e\\u003cscript\\u003ealert(\'hello,    \');\\u003c/script\\u003e":    "\\u003c/script\\u003e\\u003cscript\\u003ealert(\'\\u0026world!\');\\u003c/script\\u003e"}'
    escaped_json = dump_js_escaped_json(malicious_dict)
    self.assertEquals(expected_escaped_json, escaped_json)
