linting
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m9s
Run linting on the backend code / Build (pull_request) Successful in 34s
Run testing on the backend code / Build (pull_request) Failing after 1m56s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 17s
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m9s
Run linting on the backend code / Build (pull_request) Successful in 34s
Run testing on the backend code / Build (pull_request) Failing after 1m56s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 17s
This commit is contained in:
@@ -6,11 +6,13 @@ import pytest
|
||||
from ..structs.landmark import Toilets
|
||||
from ..main import app
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def client():
|
||||
"""Client used to call the app."""
|
||||
return TestClient(app)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"location,radius,status_code",
|
||||
[
|
||||
@@ -39,8 +41,6 @@ def test_invalid_input(client, location, radius, status_code): # pylint: disa
|
||||
assert response.status_code == status_code
|
||||
|
||||
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"location,status_code",
|
||||
[
|
||||
@@ -66,11 +66,10 @@ def test_no_toilets(client, location, status_code): # pylint: disable=redefin
|
||||
toilets_list = [Toilets.model_validate(toilet) for toilet in response.json()]
|
||||
|
||||
# checks :
|
||||
assert response.status_code == 200 # check for successful planning
|
||||
assert response.status_code == status_code # check for successful planning
|
||||
assert isinstance(toilets_list, list) # check that the return type is a list
|
||||
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"location,status_code",
|
||||
[
|
||||
@@ -97,6 +96,6 @@ def test_toilets(client, location, status_code): # pylint: disable=redefined-
|
||||
toilets_list = [Toilets.model_validate(toilet) for toilet in response.json()]
|
||||
|
||||
# checks :
|
||||
assert response.status_code == 200 # check for successful planning
|
||||
assert response.status_code == status_code # check for successful planning
|
||||
assert isinstance(toilets_list, list) # check that the return type is a list
|
||||
assert len(toilets_list) > 0
|
||||
assert len(toilets_list) > 0
|
||||
|
||||
Reference in New Issue
Block a user