docstr: Router raises a ValueError if each route is not a dictionary
docstr_tok: ["Router","raises","a","ValueError","if","each","route","is","not","a","dictionary"]
code: def test_router_raises_value_error_if_route_not_dictionary(self):
      """
      Router raises a ValueError if each route is not a dictionary
      """
      routes = [
          {
              "condition": "{{streams|length < 2}}",
              "output": "{{query}}",
              "output_type": str,
              "output_name": "query",
          },
          ["{{streams|length >= 2}}", "streams", List[int]],
      ]
  
      with pytest.raises(ValueError):
          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 12 for calling the TestRouter obj's underlying member method code with example usage: obj.test_router_raises_value_error_if_route_not_dictionary() without return types