-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ec68a6
commit 11a9c41
Showing
3 changed files
with
34 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
import requests | ||
|
||
BASE_URL = "http://127.0.0.1:8000" | ||
# BASE_URL = "http://127.0.0.1:8000" | ||
|
||
def test_get_parts(): | ||
manufacturer_name = "Ammann" | ||
response = requests.get(f"{BASE_URL}/parts/?manufacturer={manufacturer_name}") | ||
# def test_get_parts(): | ||
# manufacturer_name = "Ammann" | ||
# response = requests.get(f"{BASE_URL}/parts/?manufacturer={manufacturer_name}") | ||
|
||
assert response.status_code == 200 | ||
# Further checks can be added based on expected response content | ||
# assert response.status_code == 200 | ||
# # Further checks can be added based on expected response content | ||
|
||
|
||
from fastapi.testclient import TestClient | ||
from api.api_server import app | ||
|
||
client = TestClient(app) | ||
|
||
def test_get_parts(): | ||
response = client.get("/parts/?manufacturer=Ammann") | ||
assert response.status_code == 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters