    def test_download_failed_russian_source(self, downloader_mock):
      downloader_mock.side_effect = DownloadFailed
      laikad = Laikad(auto_update=False)
      correct_msgs = verify_messages(self.logs, laikad)
      self.assertEqual(375, len(correct_msgs))
      self.assertEqual(375, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid]))
  
    def test_laika_get_orbits(self):
      laikad = Laikad(auto_update=False)
      # Pretend process has loaded the orbits on startup by using the time of the first gps message.
      laikad.fetch_navs(self.first_gps_time, block=True)
 
</s> remove     correct_msgs_expected = 559
 </s> add     correct_msgs_expected = 560 </s> remove       self.assertEqual(correct_msgs_expected, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid]))
 </s> add       self.assertEqual(valid_fix_expected, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid])) </s> remove       correct_msgs_expected = 42 if use_qcom else 559
 </s> add       correct_msgs_expected = 44 if use_qcom else 560
      valid_fix_expected = 43 if use_qcom else 560
 </s> remove                                         valid=kf_valid),
        "positionECEF": measurement_msg(value=position_estimate, std=position_std.tolist(), valid=bool(self.last_fix_t == t)),
        "velocityECEF": measurement_msg(value=velocity_estimate, std=velocity_std.tolist(), valid=bool(self.last_fix_t == t)),

        "measTime": gnss_mono_time,
        "correctedMeasurements": meas_msgs,
        "timeToFirstFix": self.ttff,
        "ephemerisStatuses": self.create_ephem_statuses(),
      }
 </s> add                                         valid=kf_valid)

    msg_dict['gpsWeek'] = self.last_report_time.week
    msg_dict['gpsTimeOfWeek'] = self.last_report_time.tow
    msg_dict['timeToFirstFix'] = self.ttff
    msg_dict['ephemerisStatuses'] = self.create_ephem_statuses()
    out_msg.gnssMeasurements = msg_dict </s> remove       corrected_measurements = []
      instant_fix = self.get_lsq_fix(t, processed_measurements)
 </s> add       est_pos = self.gnss_kf.x[GStates.ECEF_POS].tolist()
    corrected_measurements = correct_measurements(processed_measurements, est_pos, self.astro_dog)
    return corrected_measurements

  def calc_fix(self, t, measurements):
    instant_fix = self.get_lsq_fix(t, measurements)
    expected_msgs = 376
    self.assertEqual(expected_msgs, len(correct_msgs))
    self.assertEqual(expected_msgs, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid]))
    def test_download_failed_russian_source(self, downloader_mock):
      downloader_mock.side_effect = DownloadFailed
      laikad = Laikad(auto_update=False)
      correct_msgs = verify_messages(self.logs, laikad)
    expected_msgs = 376
    self.assertEqual(expected_msgs, len(correct_msgs))
    self.assertEqual(expected_msgs, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid]))
    expected_msgs = 376
    self.assertEqual(expected_msgs, len(correct_msgs))
    self.assertEqual(expected_msgs, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid]))
  
    def test_laika_get_orbits(self):
      laikad = Laikad(auto_update=False)
      # Pretend process has loaded the orbits on startup by using the time of the first gps message.
      laikad.fetch_navs(self.first_gps_time, block=True)
keep keep keep keep replace replace keep keep keep keep keep
 Laika cleaner flow (#27633)

* laika flow

* test fixes

* unexpected type

* unexpected type

* explicit type

* ref commit

* back to prev val

* ref 2 
selfdrive/locationd/test/test_laikad.py