prompts.chatprompts.chatprompts.chat
TeamsBotsSkillsPromptsPromptmasters
BookFor KidsDevelopers
Login
CC0 2026 prompts.chat
DeepWikiHow to...DocsAPIPrivacyTermsSupportAboutGitHub

Django Unit Test Generator for Viewsets

Generates unit tests for a given Django Viewset, including CRUD operations and edge cases.

K
@koksalkapucuoglu
11 months agoDecember 14, 2025 at 01:47 PM
Coding•TestingCode Review

Content

I want you to act as a Django Unit Test Generator. I will provide you with a Django Viewset class, and your job is to generate unit tests for it. Ensure the following:

1. Create test cases for all CRUD (Create, Read, Update, Delete) operations.
2. Include edge cases and scenarios such as invalid inputs or permissions issues.
3. Use Django's TestCase class and the APIClient for making requests.
4. Make use of setup methods to initialize any required data.

Please organize the generated test cases with descriptive method names and comments for clarity. Ensure tests follow Django's standard practices and naming conventions.

Related Skills

Post-Implementation Audit

Skill

A read-only post-implementation audit workflow for coding agents. Reviews completed code changes for requirement coverage, correctness, regressions, verification evidence, edge cases, scope integrity, and commit quality without modifying the implementation. Produces evidence-backed CLEAR, FINDINGS, or INCOMPLETE results and supports structured re-audits after remediation.

s@songolge-lab
1

OpenAPI Spec Drift Checker

Skill

Compares an OpenAPI YAML/JSON spec to a list of implemented routes and flags drift: missing operations, extra routes, method mismatches, and path-parameter shape differences. Use when reviewing API PRs, before a release, or asking "does our code still match the OpenAPI?". Includes a stdlib Python checker with --self-test.

Related Bots

Prompt Regression Tester

Bot

Catches quality drops when you change an AI feature's prompt or model: runs your test cases, compares old and new answers side by side, and tracks cost and speed.

1 scheduled routine1 event trigger

Comments (0)

F@f
0

Flaky Test Detector

Skill

Finds flaky tests from repeated CI runs: parses JUnit XML or a CSV run history, flags tests that both pass and fail (confirmed when on the same commit), ranks them by flip and failure rate, and suggests likely causes and fixes. Use when CI is "randomly red", before adding retries, or triaging a quarantine list. Includes a stdlib Python detector with --self-test.

F@f
0

Gitignore Pattern Tester and Reviewer

Skill

Explains every line of a .gitignore, tests it against paths that must be ignored or must stay committable, names the rule that decides each path, and flags mistakes such as negations blocked by an excluded parent folder, inline comments, leading spaces, backslashes, stray **, secrets not covered and .env.example ignored. Returns a fixed file. Includes a stdlib Python checker with --self-test, matched against real git.

F@f
0
F
@f
0

Test Coverage Gap Finder

Bot

Finds the riskiest untested code: files that change often, break often and have low coverage.

1 scheduled routine
F@f0

Load Test Planner

Bot

Plans realistic load tests before a launch or traffic spike: models expected traffic, writes test scenarios, reads the results and points to the first bottleneck to fix.

1 scheduled routine1 event trigger
F@f0

Framework Upgrade Navigator

Bot

Plans a major framework upgrade step by step, such as React, Next.js, Django or Rails: reads the breaking changes, maps what in your code they hit, and splits the work into small safe pull requests.

1 scheduled routine1 event trigger
F@f1