Setup homeassistant automagically for Testing?

I’m interested in being able to setup a container with homeassistant with the private-demo setup but in a way so I can run api calls against it - without having to manually go through and create access tokens.

This is to run tests automagically. Not for production use.

Is there a way to programmatically do it or somehow add config that lets me login with some static/predefined username/password ?

Realizing I also need a user or even couple of users created.

tried what is described in How To Automate Initial Onboarding/Set-Up? - #4 by RyanAelen with trusting 0.0.0.0 and bypass_login but seem to only work for the browser not using the rest API…

is that expected?

Found that homeassistant demo is apparently just mounts and existing config (deployments/private_demo/main.tf at 06e0d7f757bc2d4fdfb4091dd470f1a861672718 · home-assistant/deployments · GitHub)

Which would have to include a long lived access token to be able to access the API programmatically?

Is that the only real option?