Skip to content

Commit 16709b0

Browse files
feat: update test cases
1 parent fac8253 commit 16709b0

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

api-batch-test/pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ norecursedirs = lib bin include .venv venv build dist *.egg-info __pycache__
77
addopts = --template=html1/index.html --report=./reports/html1-report.html
88
markers =
99
smoke: testes rápidos de disponibilidade
10+
heavy: testes pesados/lentos
1011
contract: validação de schema/contrato
1112
pagination: validação de paginação
1213
negative: casos de erro/limites

api-batch-test/tests/test_people_contract.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,14 @@ def test_people_page_schema(http):
1414
assert isinstance(data["results"], list)
1515
assert data["count"] == 82
1616
for item in data["results"]:
17-
validate(instance=item, schema=PEOPLE_ITEM_SCHEMA)
17+
validate(instance=item, schema=PEOPLE_ITEM_SCHEMA)
18+
19+
20+
21+
@pytest.mark.contract
22+
def test_people_page_schema_by_id(http):
23+
r = http.get(Endpoints.PEOPLE + "1")
24+
r.raise_for_status()
25+
data = r.json()
26+
validate(instance=data, schema=PEOPLE_ITEM_SCHEMA)
27+
assert isinstance(data, object)

api-batch-test/tests/test_people_pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99

1010

11-
@pytest.mark.contract
11+
@pytest.mark.heavy
1212
@pytest.mark.pagination
1313
def test_people_pagination_integrity(http):
1414
total_count = None

0 commit comments

Comments
 (0)