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