# ... moved and adapted code from test_phase4_endpoints.py ...