Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ def get_hello_3(string_1: str, string_2: str, string_3: str):
return f"Hello {string_1}, {string_2}, {string_3}"


# @app.get(
# "/{string_1}/{string_2}/{string_3}/{string_4}",
# response_model=str,
# status_code=status.HTTP_200_OK,
# )
# def get_hello_4(string_1: str, string_2: str, string_3: str, string_4: str):
# return f"Hello {string_1}, {string_2}, {string_3}, {string_4}"
@app.get(
"/{string_1}/{string_2}/{string_3}/{string_4}",
response_model=str,
status_code=status.HTTP_200_OK,
)
def get_hello_4(string_1: str, string_2: str, string_3: str, string_4: str):
return f"Hello {string_1}, {string_2}, {string_3}, {string_4}"


if __name__ == "__main__":
Expand Down
8 changes: 4 additions & 4 deletions src/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ def test_get_hello_3():
assert response.json() == "Hello devops, engineers, again"


# def test_get_hello_4():
# response = client.get(url="/devops/engineers/once/more")
# assert response.status_code == 200
# assert response.json() == "Hello devops, engineers, once, more"
def test_get_hello_4():
response = client.get(url="/devops/engineers/once/more")
assert response.status_code == 200
assert response.json() == "Hello devops, engineers, once, more"


def test_not_found():
Expand Down
Loading