Glossary · Phase 8 · APIs
Test client
A pretend browser built into a web framework that sends requests straight to the app, with no network, so tests can check every page.
On your own computer you'd start a development server with
flask --app app runand open http://127.0.0.1:5000 in a browser. Here, the test client sends requests to the app directly, with no network: exactly how you'll test web apps in real projects too.
Try it now
Flask does the plumbing; your code is the view and the template.
Learn it properly
Web pages with Flask · Routes, Jinja templates, a shared layout, links and error pages, tested with the test client. About 45 minutes.
Other terms from the same lesson
- Jinja: Python's most used template engine: it fills the gaps in an HTML template with values, escaping them so text can't turn into markup.
- template inheritance: Writing a site's shared page frame once, in a base template with named blocks, so each page only fills in the blocks that differ.
Never trained an AI?
Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.