Library · Developer · developers
Django Unit Test Generator for Viewsets
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:…
Prompt text
How it works
Conceptual workflow
Derived from this prompt's instructions: adopt Django Unit Test Generator, then reply one turn at a time. This is a map of the text, not a live model execution. For compile, eval, constrain, and search loops, see prompt engineering.
vcp · prompts/django-unit-test-generator-for-viewsets
loop@turns
- receive
- role
- execute
- output
- wait
Stage 1 / 5 · receive
Receive the user turn
The user sends a task, command, or line of dialogue. That text is the only new input for this turn.
Artifact · user-turn.txt
User input
pwd
Rule in force
This turn’s input is the only new information.
Visible reply
(waiting — role not adopted yet)
Illustration · not a live model run
Prompt evidence
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.
Loop · wait returns to receive
Conceptual workflow · 4.5s / stage · 1/5