Skip to content

Test Crud App

openapi_first.templates.crud_app.test_crud_app

End-to-end tests for the OpenAPI-first CRUD example app.

These tests validate that all CRUD operations behave correctly against the in-memory mock data store. - OpenAPI specification loading - OperationId-driven route binding on the server - OperationId-driven client invocation - Correct HTTP status codes and response payloads

The tests exercise all CRUD operations against an in-memory mock data store and assume deterministic behavior within a single process.

The tests assume: - OpenAPI-first route binding - In-memory storage (no persistence guarantees) - Deterministic behavior in a single process - One-to-one correspondence between OpenAPI operationId values and server/client callables

Classes

Functions

test_create_item

test_create_item()

Creating a new item should return the created entity.

test_delete_item

test_delete_item()

Deleting an item should remove it from the store.

test_get_item

test_get_item()

Existing item should be retrievable by ID.

test_list_items_initial

test_list_items_initial()

Initial items should be present.

test_update_item

test_update_item()

Updating an item should replace its values.