docstr: ConditionalRouter init raises a ValueError if one of the routes contains invalid condition
docstr_tok: ["ConditionalRouter","init","raises","a","ValueError","if","one","of","the","routes","contains","invalid","condition"]
code: def test_invalid_condition_field(self):
      """
      ConditionalRouter init raises a ValueError if one of the routes contains invalid condition
      """
      # invalid condition field
      routes = [
          {
              "condition": "{{streams|length < 2",
              "output": "query",
              "output_type": str,
              "output_name": "test",
          }
      ]
      with pytest.raises(ValueError, match="Invalid template"):
          ConditionalRouter(routes)
  
imports: import copy
  from typing import List
  from unittest import mock
  import pytest
  from haystack.components.routers import ConditionalRouter
  from haystack.components.routers.conditional_router import NoRouteSelectedException
  from haystack.dataclasses import ChatMessage
label_desc: Use image node_id 4 for calling the TestRouter obj's underlying member method code with example usage: obj.test_invalid_condition_field() without return types