Factor out test setup/teardown; set up a temporary project properly for a test