Improve csv test to test final output rather than the csv