This credential-free Python example shows how tests can prove application decisions without retesting a framework or network service.
- Python 3.11 or newer
There are no packages to install.
From the repository root:
python3 -m unittest discover \
-s tutorials/testing-ai-generated-code/code/tests \
-vExpected result:
Ran 6 tests
OK
The tests do not create persistent files, so there is no reset step.
auth_service.pycontains the session-expiry policy.tests/test_auth_service.pytests the documented behavior with fixed times.
This is a focused unit example. It does not prove database persistence, HTTP behavior, token ownership, or production clock synchronization.