Consolidate test setup code in agar.test.base_test