converted test_client to run without twisted