Files
Martin Slachta 0d829845c4 initial
2026-06-11 19:03:29 +02:00

1.0 KiB

Reservair Tests

Integration & system tests for the Reservair WordPress plugin REST API. Written in Python.

System tests are testing if the whole system is behaving as it should. You should first and foremost define, what that even mean. You can build a test client like ReservationClient that has create_reservation_at() method.

Integration tests are testing if interface is working correctly. It is testing if the interface the implemented client for system tests is using, is in fact correct.

Requirements

pip install -r Forms/requirements.txt

Configuration

By default tests run against http://localhost/wordpress. Override with:

export WP_BASE_URL=http://mysite.local

Running

All tests:

cd tests
pytest

Specific subfolder:

pytest Forms/

Specific test file:

pytest Forms/test_form_definition.py

Specific test:

pytest Forms/test_form_definition.py::TestFormDefinitionCreation::test_can_create_form_definition

Add -v for verbose output.