Skip to content

Commit

Permalink
Merge pull request #253 from vipyrsec/br/gh148
Browse files Browse the repository at this point in the history
Bump dependencies and purge requests
  • Loading branch information
jonathan-d-zhang authored Aug 3, 2024
2 parents 15267b5 + 153de72 commit 41dd32d
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 291 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ which will invoke `docker compose` for you.
We use `pytest` to run our tests. Tests go in the `tests/` directory.
The tests for each python module should go in a separate tests file.

We use `requests` for making requests to the API. Use the fixture `api_url` for the URL to make requests to.
We use `httpx` for making requests to the API. Use the fixture `api_url` for the URL to make requests to.
For example:

```py
def test_root(api_url: str):
r = requests.get(api_url)
r = httpx.get(api_url)
assert r.status_code == 200
```

Expand All @@ -91,7 +91,7 @@ For example:

```py
def test_query(api_url: str, db_session: Session):
r = requests.get(api_url + "/package?name=a&version=0.1.0")
r = httpx.get(api_url + "/package?name=a&version=0.1.0")
data = r.json()
assert r["name"] == "a"
```
Expand Down
Loading

0 comments on commit 41dd32d

Please sign in to comment.