code: def test_response_200_with_order_by(self, session):
      pool_model = Pool(
          pool="test_pool_a", slots=3, include_deferred=True
      )
      session.add(pool_model)
      session.commit()
      result = session.query(Pool).all()
      assert len(result) == 2  # accounts for the default pool as well
      response = self.client.get(
          "/api/v1/pools?order_by=slots",
          environ_overrides={"REMOTE_USER": "test"},
      )
      assert response.status_code == 200
      assert {
          "pools": [
              {
                  "name": "test_pool_a",
                  "slots": 3,
                  "occupied_slots": 0,
                  "running_slots": 0,
                  "queued_slots": 0,
                  "scheduled_slots": 0,
                  "deferred_slots": 0,
                  "open_slots": 3,
                  "description": None,
                  "include_deferred": True,
              },
              {
                  "name": "default_pool",
                  "slots": 128,
                  "occupied_slots": 0,
                  "running_slots": 0,
                  "queued_slots": 0,
                  "scheduled_slots": 0,
                  "deferred_slots": 0,
                  "open_slots": 128,
                  "description": "Default pool",
                  "include_deferred": False,
              },
          ],
          "total_entries": 2,
      } == response.json
  
imports: from __future__ import annotations
  import pytest
  from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP
  from airflow.models.pool import Pool
  from airflow.security import permissions
  from airflow.utils.session import provide_session
  from tests.test_utils.api_connexion_utils import assert_401, create_user, delete_user
  from tests.test_utils.config import conf_vars
  from tests.test_utils.db import clear_db_pools
label_desc: Use image node_id 2 for calling the TestGetPools obj's underlying member method code with example usage: obj.test_response_200_with_order_by(session) without return types