if self.index_from_metadata:
index = self.build_index_from_metadata()
else:
index = self.build_index(
server_config,
self.date_range(self.payload["start"], self.payload["end"]),
)
This if/else is repeated several times, and that stands out in the pattern of your changes. It could really be refactored into a new superclass method, which would streamline the test cases a bit.
Originally posted by @dbutenhof in #2581 (comment)