  
  ECU_NAME = {v: k for k, v in Ecu.schema.enumerants.items()}
  
  
  class TestFwFingerprint(unittest.TestCase):
    def assertFingerprints(self, candidates, expected):
      candidates = list(candidates)
      self.assertEqual(len(candidates), 1, f"got more than one candidate: {candidates}")
      self.assertEqual(candidates[0], expected)
 
</s> remove from selfdrive.car.fw_versions import FW_QUERY_CONFIGS, VERSIONS, match_fw_to_car
 </s> add from selfdrive.car.fw_versions import FW_QUERY_CONFIGS, VERSIONS, match_fw_to_car, get_fw_versions
class FakeSocket:
  def receive(self, non_blocking=False):
    pass

  def send(self, msg):
    pass


  
  ECU_NAME = {v: k for k, v in Ecu.schema.enumerants.items()}
  
  
class FakeSocket:
  def receive(self, non_blocking=False):
    pass

  def send(self, msg):
    pass


  class TestFwFingerprint(unittest.TestCase):
    def assertFingerprints(self, candidates, expected):
      candidates = list(candidates)
      self.assertEqual(len(candidates), 1, f"got more than one candidate: {candidates}")
      self.assertEqual(candidates[0], expected)
keep keep keep add keep keep keep keep keep
 FPv2: add timing unit test (#27753)

* add timing unit test

* formatting

* not clean

* Revert "not clean"

This reverts commit dab35d582c274efc32d693fc0a2773d8727be2bd.

* Revert "formatting"

This reverts commit 56a1ae4bb721594cc68952e5747a3ebc652f62d9.

* need to consider subaddrs (0.3 to 0.7s for toyota)

* clean up

* move to test_fw_fingerprint

* use a thread to get real time

* lower threshold

* revert that

* ?

* some sleep

* at top

* use the config

* function to measure query time, similar to opendbc's convention

* revert that

* avg

* Update selfdrive/car/tests/test_fw_fingerprint.py

* draft

* starting a thread takes a long time!

* refs

* uncomment 
selfdrive/car/tests/test_fw_fingerprint.py