fixed syntax error in tests/unit/api.py, and added cfg section for
headnode in test-common