Add test for get_years.

- Makes sure generator exhausts when we run out of photos.