Fixed test errors
Fix compatibility with astropy 1.0.dev