CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/flask-testing

Write correct Flask tests -- app factory with test config, application context fixtures, database isolation, file uploads, auth testing, error handlers, mock.patch placement, and essential API test patterns

98

1.15x
Quality

99%

Does it follow best practices?

Impact

97%

1.15x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

Evaluation results

92%

25%

Blog API Tests

Criteria
Without context
With context

App context in fixture

25%

100%

Conftest fixture structure

64%

100%

Test config with TESTING=True

100%

100%

Database isolation per test

66%

100%

Auth tests both paths

100%

100%

Essential test patterns

100%

100%

Error response body checked

0%

0%

json= for POST requests

100%

100%

get_json() for responses

100%

100%

Run command documented

0%

100%

98%

4%

E-commerce Checkout Flow Tests

Criteria
Without context
With context

mock.patch targets import location

100%

100%

Mock args before fixture args

75%

100%

App context in fixture

100%

100%

SQLAlchemy test isolation

90%

100%

Auth fixture

100%

100%

Happy path checkout test

100%

100%

Payment failure test

100%

100%

Validation tests

75%

75%

Test config with TESTING=True

100%

100%

Email mock assertion

100%

100%

100%

6%

Document Upload Service Tests

Criteria
Without context
With context

BytesIO file upload pattern

100%

100%

data= with content_type multipart

100%

100%

Valid and invalid file type tests

100%

100%

App context in fixture

50%

100%

Test config with TESTING=True

100%

100%

Auth via API key header

100%

100%

Auth both paths tested

100%

100%

Owner-only access tested

100%

100%

Conftest fixture structure

100%

100%

Database isolation per test

100%

100%

96%

26%

Recipe Sharing App Tests

Criteria
Without context
With context

App context in fixture

35%

100%

Auth client fixture

0%

100%

Auth both paths tested

100%

100%

SQLAlchemy test isolation

100%

100%

Test config with TESTING=True

100%

100%

Conftest fixture structure

70%

100%

Authorization tests (author only)

100%

100%

Essential test patterns

100%

100%

json= for POST and get_json() for response

100%

100%

Run command documented

0%

0%

100%

3%

Task Tracker with CLI Commands Tests

Criteria
Without context
With context

CLI test runner fixture

100%

100%

CLI command tests

100%

100%

Error handler body tested

100%

100%

App context in fixture

100%

100%

Conftest with app, client, runner

100%

100%

Database isolation per test

62%

100%

Auth both paths tested

100%

100%

Status transition validation

100%

100%

Admin-only delete tested

100%

100%

Test config with TESTING=True

100%

100%

Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents