Skip to content

Commit bfccdf3

Browse files
committed
docs: add python route test guidelines and update section mapping
- Added instructions for Python route tests to documentation. - Updated constants to include Python Route Tests in section mapping. - Moved and clarified instructions file for FastAPI route testing. Generated-by: aiautocommit
1 parent e540a80 commit bfccdf3

4 files changed

Lines changed: 20 additions & 1 deletion

File tree

.cursor/rules/python-route-tests.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2+
description:
23
globs: tests/routes/**/*.py
34
alwaysApply: false
45
---
5-
66
## Python Route Tests
77

88
- Polyfactory is the [factory](tests/factories.py) library in use. `ModelNameFactory.build()` is how you generate factories.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
applyTo: "tests/routes/**/*.py"
3+
---
4+
## Python Route Tests
5+
6+
- Polyfactory is the [factory](tests/factories.py) library in use. `ModelNameFactory.build()` is how you generate factories.
7+
- Use `assert_status(response)` to check the response of a client

constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"Python": "**/*.py",
1010
"Python App": "**/*.py",
1111
"Pytest Integration Tests": "tests/integration/**/*.py",
12+
"Python Route Tests": "tests/routes/**/*.py",
1213
"FastAPI": "app/routes/**/*.py",
1314

1415
"React": "**/*.tsx",

instructions.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,17 @@ Here's how environment variables are managed in this application:
293293
- `*.local` files have a `-example` variant which is committed to version control. These document helpful environment variables for local development.
294294
- When writing TypeScript/JavaScript/React, use `requireEnv("THE_ENV_VAR_NAME")` to read an environment variable. `import {requireEnv} from '~/utils/environment'`
295295

296+
## Implement Fastapi Routes
297+
298+
The file docstring contains a description of the FastAPI routes we need to implement. Implement these routes.
299+
300+
Avoid implementing any Stripe logic right now. I will do that later. Leave TODOs for this and other areas where you are very unsure of what to do.
301+
302+
## Python Route Tests
303+
304+
- Polyfactory is the [factory](tests/factories.py) library in use. `ModelNameFactory.build()` is how you generate factories.
305+
- Use `assert_status(response)` to check the response of a client
306+
296307
## Refactor On Instructions
297308

298309
Refactor this code following all the established coding rules. Carefully review each rule.

0 commit comments

Comments
 (0)