      keys = dispatcher["getSshAuthorizedKeys"]()
      self.assertEqual(keys, MockParams().params["GithubSshKeys"].decode('utf-8'))
  
    def test_jsonrpc_handler(self):
      end_event = threading.Event()
      thread = threading.Thread(target=athenad.jsonrpc_handler, args=(end_event,))
      thread.daemon = True
 
</s> remove with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "common", "version.h")) as _versionf:
  version = _versionf.read().split('"')[1]
 </s> add def get_version():
  with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "common", "version.h")) as _versionf:
    version = _versionf.read().split('"')[1]
  return version </s> remove from selfdrive.version import dirty, origin, branch, commit
 </s> add from selfdrive.version import dirty, origin, branch, commit, get_version, get_git_remote, get_git_branch, get_git_commit
  def test_getVersion(self):
    resp = dispatcher["getVersion"]()
    keys = ["version", "remote", "branch", "commit"]
    self.assertEqual(list(resp.keys()), keys)
    for k in keys:
      self.assertIsInstance(resp[k], str, f"{k} is not a string")
      self.assertTrue(len(resp[k]) > 0, f"{k} has no value")

      keys = dispatcher["getSshAuthorizedKeys"]()
      self.assertEqual(keys, MockParams().params["GithubSshKeys"].decode('utf-8'))
  
  def test_getVersion(self):
    resp = dispatcher["getVersion"]()
    keys = ["version", "remote", "branch", "commit"]
    self.assertEqual(list(resp.keys()), keys)
    for k in keys:
      self.assertIsInstance(resp[k], str, f"{k} is not a string")
      self.assertTrue(len(resp[k]) > 0, f"{k} has no value")

    def test_jsonrpc_handler(self):
      end_event = threading.Event()
      thread = threading.Thread(target=athenad.jsonrpc_handler, args=(end_event,))
      thread.daemon = True
keep keep add keep keep keep keep
 athena: version endpoint (#21045)

* athena: version endpoint

* get_version function

* more explicit version validation 
selfdrive/athena/tests/test_athenad.py