Skip to content

Commit a1cb214

Browse files
✅ Add test for entrypoint
1 parent 2793daf commit a1cb214

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

src/fastapi_new/new.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,21 @@ class ProjectConfig:
2929
def _generate_readme(project_name: str) -> str:
3030
return f"""# {project_name}
3131
32-
A project created with FastAPI Cloud CLI.
32+
A project created with FastAPI CLI.
3333
3434
## Quick Start
3535
36-
Start the development server:
36+
### Start the development server:
3737
3838
```bash
3939
uv run fastapi dev
4040
```
4141
4242
Visit http://localhost:8000
4343
44-
Deploy to FastAPI Cloud:
44+
### Deploy to FastAPI CLI:
45+
46+
> Reader's note: These commands are not quite ready for prime time yet, but will be soon! Join the waiting list at https://fastapicloud.com!
4547
4648
```bash
4749
uv run fastapi login

tests/test_cli.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import subprocess
2+
import sys
3+
4+
5+
def test_script() -> None:
6+
result = subprocess.run(
7+
[sys.executable, "-m", "coverage", "run", "-m", "fastapi_new", "--help"],
8+
capture_output=True,
9+
encoding="utf-8",
10+
)
11+
assert "Usage" in result.stdout

0 commit comments

Comments
 (0)