-
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.
Dockerfile update and package restructuring
- Loading branch information
1 parent
cefc548
commit 6e0b39b
Showing
19 changed files
with
75 additions
and
60 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
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
File renamed without changes.
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
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
File renamed without changes.
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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ fastapi == 0.108.0 | |
grpcio-tools==1.58.0 | ||
uvicorn==0.25.0 | ||
python-multipart~=0.0.9 | ||
requests == 2.31.0 |
Empty file.
Empty file.
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
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,33 @@ | ||
import json | ||
|
||
import pytest | ||
from fastapi.testclient import TestClient | ||
|
||
from api.main import app | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def test_app(): | ||
client = TestClient(app) | ||
yield client | ||
|
||
|
||
def test_post_json_success(test_app, monkeypatch): | ||
with open("test/test_data/test_payload.json", "r") as file: | ||
json_data = json.load(file) | ||
monkeypatch.setattr("api.main.IngestToPipeline.ingest", lambda *a: ("Success", 200)) | ||
|
||
response = test_app.post("/json?input_type=json", json=json_data) | ||
assert response.status_code == 200 | ||
|
||
assert response.json() == {"status_message": "Success", "status_code": 200} | ||
|
||
|
||
def test_post_json_failure(test_app, monkeypatch): | ||
with open("test/test_data/test_payload.json", "r") as file: | ||
json_data = json.load(file) | ||
monkeypatch.setattr("api.main.IngestToPipeline.ingest", lambda *a: ("Success", 200)) | ||
|
||
response = test_app.post("/json?input_type=json", json=json_data) | ||
assert response.status_code == 200 | ||
assert response.json() == {"status_message": "Success", "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
6e0b39b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API Unit Test Coverage Report
API Unit Test Coverage Summary