def test_get_weather_data_records(self, uow):
        syrx_file_handler = SyrxFileHandler()

        weatherstation_years_to_retrieve = {"ws1": {2014, 2015}, "ws2": {2015}}
        jan_1_2014 = pytz.utc.localize(datetime.datetime(2014, 1, 1))
        jan_1_2015 = pytz.utc.localize(datetime.datetime(2015, 1, 1))

        def get_noaa_records_side_effect(weatherstation_id, years):
            return [{"weatherstation_id": weatherstation_id,
                     "datetimeutc": pytz.utc.localize(datetime.datetime(y, 1, 1))}
                    for y in years]

        uow.return_value.weather_stations.get_noaa_records.side_effect = get_noaa_records_side_effect

        rv = syrx_file_handler.get_weather_data_records(weatherstation_years_to_retrieve)

        assert rv["ws1"] == {jan_1_2014: {"weatherstation_id": "ws1", "datetimeutc": jan_1_2014},
                             jan_1_2015: {"weatherstation_id": "ws1", "datetimeutc": jan_1_2015}}
        assert rv["ws2"] == {jan_1_2015: {"weatherstation_id": "ws2", "datetimeutc": jan_1_2015}}