def test_escape_slash(self): script = json_script(["</script>"]) assert_equal( '<script type="application/json">["<\\/script>"]</script>', str(script))
def test_script(self): script = json_script([1, 2, "a"]) assert_equal('[1, 2, "a"]', script.script)
def test_serialized(self): script = json_script([1, 2, "a"]) assert_equal('<script type="application/json">[1, 2, "a"]</script>', str(script))
def test_element_type(self): script = json_script([]) assert_is_instance(script, Script)
def test_type(self): script = json_script([]) assert_equal("application/json", script.type)
def test_escape_slash(self): script = json_script(["</script>"]) assert_equal( '<script type="application/json">["<\\/script>"]</script>', str(script), )