-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add additional tests for the webserver's startup
- Loading branch information
1 parent
7d6f2d9
commit 91aa53d
Showing
4 changed files
with
20 additions
and
2 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 |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
|
||
# Components | ||
dummy = Dummy() | ||
dummy.start() | ||
server = FastAPI() | ||
client = ["http://localhost:8001"] | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from schunk_egu_egk_gripper_dummy.main import server | ||
from fastapi.testclient import TestClient | ||
|
||
|
||
def test_info_route_is_available(): | ||
client = TestClient(server) | ||
assert client.get("/adi/info.json").is_success | ||
|
||
|
||
def test_enum_route_is_available(): | ||
client = TestClient(server) | ||
assert client.get("/adi/enum.json").is_success | ||
|
||
|
||
def test_data_route_is_available(): | ||
client = TestClient(server) | ||
assert client.get("/adi/data.json").is_success |