code: def test_success(self):
      token = "Basic " + b64encode(b"test:test").decode()
      clear_db_pools()
  
      with self.app.test_client() as test_client:
          response = test_client.get(
              "/api/v1/pools", headers={"Authorization": token}
          )
          assert current_user.email == "test@fab.org"
  
      assert response.status_code == 200
      assert response.json == {
          "pools": [
              {
                  "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": 1,
      }
  
imports: from __future__ import annotations
  from base64 import b64encode
  import pytest
  from flask_login import current_user
  from tests.test_utils.api_connexion_utils import assert_401
  from tests.test_utils.config import conf_vars
  from tests.test_utils.db import clear_db_pools
  from tests.test_utils.www import client_with_login
label_desc: Use image node_id 2 for calling the TestBasicAuth obj's underlying member method code with example usage: obj.test_success() without return types