code: def test_auth(self):
      session = requests.Session()
  
      response = session.get(f"{HTTP_API_ROOT}/status")
      assert response.status_code == 200
      assert response.json()["auth"]["http_auth_enabled"] is False
  
      response = session.get(f"{HTTP_API_ROOT}/config/")
      assert response.status_code == 200
      assert response.json()["auth"]["http_auth_enabled"] is False
  
      response = session.get(f"{HTTP_API_ROOT}/tree/")
      assert response.status_code == 200
  
      response = session.put(
          f"{HTTP_API_ROOT}/config/",
          json={
              "http_auth_enabled": True,
              "username": "",
              "password": "",
          },
      )
      assert response.status_code == 400
  
      response = session.put(
          f"{HTTP_API_ROOT}/config/",
          json={
              "auth": {
                  "http_auth_enabled": True,
                  "username": "mindsdb",
                  "password": "mindsdb",
              }
          },
      )
      assert response.status_code == 200
  
      response = session.get(f"{HTTP_API_ROOT}/status")
      assert response.status_code == 200
      assert response.json()["auth"]["http_auth_enabled"] is True
  
      response = session.get(f"{HTTP_API_ROOT}/tree/")
      assert response.status_code == 403
  
      response = session.post(
          f"{HTTP_API_ROOT}/login",
          json={"username": "mindsdb", "password": "mindsdb"},
      )
      assert response.status_code == 200
  
      response = session.get(f"{HTTP_API_ROOT}/tree/")
      assert response.status_code == 200
  
      response = session.post(f"{HTTP_API_ROOT}/logout")
      assert response.status_code == 200
  
      response = session.get(f"{HTTP_API_ROOT}/tree/")
      assert response.status_code == 403
  
      response = session.post(
          f"{HTTP_API_ROOT}/login",
          json={"username": "mindsdb", "password": "mindsdb"},
      )
      assert response.status_code == 200
  
      response = session.put(
          f"{HTTP_API_ROOT}/config/",
          json={
              "auth": {
                  "http_auth_enabled": False,
                  "username": "mindsdb",
                  "password": "mindsdb",
              }
          },
      )
  
      response = session.get(f"{HTTP_API_ROOT}/status")
      assert response.status_code == 200
      assert response.json()["auth"]["http_auth_enabled"] is False
  
imports: from pathlib import Path
  import json
  import requests
  import pandas
  import pytest
  from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
  from .conftest import make_test_csv
  from .http_test_helpers import HTTPHelperMixin
label_desc: Use image node_id 5 for calling the TestHTTP obj's underlying member method code with example usage: obj.test_auth() without return types