Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
royrusso committed Nov 27, 2024
1 parent 09d113d commit 755d072
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytests_codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: pip install -r backend/requirements.txt

- name: Run tests
run: pytest --cov --cov-report=xml
run: sudo pytest --cov --cov-report=xml

- name: Upload results to Codecov
uses: codecov/codecov-action@v4
Expand Down
8 changes: 7 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ Once the API is running, you have access to it at [http://localhost:8000](http:/
This project uses `pytest` for testing. To run the tests, run the following command:

```bash
pytest --cov
sudo pytest --cov
```

To generate a coverage report, run the following command:

```bash
sudo pytest --cov --cov-report=html
```

## Running the Frontend
Expand Down
2 changes: 1 addition & 1 deletion backend/api/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

@router.get("/", tags=["default"])
def read_root():
return {"Net Pretzel says": "Hello World"}
return {"Minerva says": "Hello World"}
5 changes: 5 additions & 0 deletions backend/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ def test_health_check():
response = client.get("/info/health")
assert response.status_code == 200
assert response.json() == {"status": "OK"}


def test_scan_list():
response = client.get("/scan/list/192.168.1.1")
assert response.status_code == 200

0 comments on commit 755d072

Please sign in to comment.