Skip to content

Commit 10108d2

Browse files
feat: update folder path and readme
1 parent 4a36fc7 commit 10108d2

7 files changed

Lines changed: 30 additions & 23 deletions

File tree

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ bin
44
include/
55
lib
66
src/__pycache__
7-
tests/__pycache__/
87
api-batch-test/src/__pycache__/*
98
api-batch-test/tests/__pycache__/*
109
api-batch-test/tests/data/__pycache__/*
11-
api-batch-test/tests/helpers/__pycache__/*
12-
api-batch-test/tests/schemas/__pycache__/*
1310
api-batch-test/config/__pycache__/settings.cpython-314.pyc
1411
reports/html1-report.html
1512
api-batch-test/tests/contract/__pycache__/test_people_contract.cpython-314-pytest-9.0.1.pyc
1613
api-batch-test/tests/test-contract/__pycache__/test_people_contract.cpython-314-pytest-9.0.1.pyc
1714
api-batch-test/tests/test-negative/__pycache__/test_negative.cpython-314-pytest-9.0.1.pyc
1815
api-batch-test/tests/test-pagination/__pycache__/test_people_pagination.cpython-314-pytest-9.0.1.pyc
1916
api-batch-test/tests/test-smoke/__pycache__/test_smoke.cpython-314-pytest-9.0.1.pyc
17+
api-batch-test/src/helpers/__pycache__/pagination.cpython-314.pyc
18+
api-batch-test/src/schemas/__pycache__/page_schema.cpython-314.pyc
19+
api-batch-test/src/schemas/__pycache__/people_schema.cpython-314.pyc

README.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This project provides a robust framework for testing REST. It follows Python bes
99
### Key Features
1010

1111
- **API Testing**: Client abstraction for REST API endpoints (GET, POST, PUT, DELETE)
12-
- **Test Fixtures**: Reusable Pytest fixtures for API client and database connections
12+
- **Test Fixtures**: Reusable Pytest fixtures for API client
1313
- **Type Hints**: Full type annotations for better IDE support and code clarity
1414
- **Error Handling**: Comprehensive error handling and logging throughout the framework
1515

@@ -18,25 +18,31 @@ This project provides a robust framework for testing REST. It follows Python bes
1818
### Project Structure
1919

2020
```
21-
pytest-api-framework/
22-
├── api-framework/
21+
API-BATCH-TEST/
22+
├── api-batch-test/
23+
│ ├── config/ # Configuration files
2324
│ ├── src/
24-
│ │ ├── __init__.py
25+
│ │ ├── helpers/ # Helper functions for tests
26+
│ │ ├── schemas/ # JSON schemas for response validation
2527
│ │ ├── api_client.py # REST API client abstraction
26-
│ │ ── api_endpoints.py # API endpoint definitions
27-
│ │ └── database.py # PostgreSQL connection management
28+
│ │ ── api_endpoints.py # API endpoint definitions
29+
│ │
2830
│ ├── tests/
29-
│ │ ├── conftest.py # Pytest fixtures and configuration
30-
│ │ ├── test_db_connection.py # Database tests
31-
│ │ ├── test_activities.py # API endpoint tests
32-
│ │ └── data/
33-
│ │ └── activities.py # Test data definitions
34-
│ ├── reports/ # Generated test reports
35-
│ ├── requirements.txt # Python dependencies
36-
│ └── pytest.ini # Pytest configuration
37-
├── docker/
38-
│ ├── docker-compose.yml # PostgreSQL container setup
39-
│ └── init.sql # Database initialization script
31+
│ │ ├── cassettes/ # VCR.py cassettes for recorded HTTP interactions
32+
│ │ ├── data/ # Test data files
33+
│ │ ├── test-contract/ # Contract tests
34+
│ │ ├── test-negative/ # Negative tests
35+
│ │ ├── test-pagination/ # Pagination tests
36+
│ │ ├── test-smoke/ # Smoke tests
37+
│ │ └── conftest.py # Pytest fixtures and configuration
38+
│ │
39+
│ ├── pyproject.toml # Project metadata and dependencies
40+
│ ├── pyvenv.cfg # Virtual environment configuration
41+
│ └── requirements.txt # Python dependencies
42+
43+
├── reports/ # Test reports
44+
├── mypy.ini # Mypy configuration
45+
├── pytest.ini # Pytest configuration
4046
└── README.md
4147
```
4248

api-batch-test/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
pytest
22
pytest-xdist
33
pytest-reporter-html1
4+
pytest-sugar
45
mypy
56
psycopg2-binary
67
jsonschema
File renamed without changes.
File renamed without changes.
File renamed without changes.

api-batch-test/tests/test-pagination/test_people_pagination.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from tests.helpers.pagination import iter_pages
1+
from src.helpers.pagination import iter_pages
22
from src.api_endpoints import Endpoints
33

44
from jsonschema import validate
5-
from tests.schemas.page_schema import PAGE_SCHEMA
6-
from tests.schemas.people_schema import PEOPLE_ITEM_SCHEMA
5+
from src.schemas.page_schema import PAGE_SCHEMA
6+
from src.schemas.people_schema import PEOPLE_ITEM_SCHEMA
77

88
import pytest
99

0 commit comments

Comments
 (0)