Home / Function/ test_escaping() — flask Function Reference

test_escaping() — flask Function Reference

Architecture documentation for the test_escaping() function in test_templating.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  c71d8e41_253d_813f_486e_b92ef27b9e3b["test_escaping()"]
  b3595fee_7041_96b0_f59f_4080381c7deb["test_templating.py"]
  c71d8e41_253d_813f_486e_b92ef27b9e3b -->|defined in| b3595fee_7041_96b0_f59f_4080381c7deb
  style c71d8e41_253d_813f_486e_b92ef27b9e3b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_templating.py lines 71–88

def test_escaping(app, client):
    text = "<p>Hello World!"

    @app.route("/")
    def index():
        return flask.render_template(
            "escaping_template.html", text=text, html=Markup(text)
        )

    lines = client.get("/").data.splitlines()
    assert lines == [
        b"&lt;p&gt;Hello World!",
        b"<p>Hello World!",
        b"<p>Hello World!",
        b"<p>Hello World!",
        b"&lt;p&gt;Hello World!",
        b"<p>Hello World!",
    ]

Subdomains

Frequently Asked Questions

What does test_escaping() do?
test_escaping() is a function in the flask codebase, defined in tests/test_templating.py.
Where is test_escaping() defined?
test_escaping() is defined in tests/test_templating.py at line 71.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free