Rework tests

Don’t start a server in the background, use the app.test_client method