Skip to content

Commit bb58490

Browse files
committed
fix: test script
1 parent a51a80a commit bb58490

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/worker/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class PdpPullRequest(BaseModel):
4848

4949
class PdpPullResponse(BaseModel):
5050
"""Fields for the PDP pull response."""
51+
5152
pdp_inst_generated: list[Any]
5253
pdp_inst_not_found: list[Any]
5354
upload_status: dict

src/worker/main_test.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ def test_retrieve_token(client: TestClient) -> Any:
4646
)
4747
assert response.status_code == 200
4848

49+
4950
def sftp_files(client: TestClient) -> Any:
5051
"""Test GET /sftp-files endpoint"""
51-
response = client.get("/sftp-files", json={"placeholder": "val"})
52+
response = client.get("/sftp-files")
5253
assert response.status_code == 200
53-
assert response.json() == {
54-
"sftp_files": {}
55-
}
54+
assert response.json() == {"sftp_files": {}}
55+
5656

5757
@patch("google.auth.default")
5858
def test_execute_pdp_pull(
@@ -76,7 +76,9 @@ def test_execute_pdp_pull(
7676
# Optionally, if there's a process_file or similar function, you can mock it too.
7777
# For this test, we're focusing on the overall endpoint behavior.
7878

79-
response = client.post("/execute-pdp-pull?sftp_source_filename=file1.csv", json={"placeholder": "val"})
79+
response = client.post(
80+
"/execute-pdp-pull?sftp_source_filename=file1.csv", json={"placeholder": "val"}
81+
)
8082

8183
# Verify the response status and content.
8284
assert response.status_code == 200

0 commit comments

Comments
 (0)