fix test setup and make first_day access safer
pep8