docstr: Delete all roles except these ones.
  Test and TestNoPermissions are deleted by delete_user above
docstr_tok: ["Delete","all","roles","except","these","ones",".","Test","and","TestNoPermissions","are","deleted","by","delete_user","above"]
code: def teardown_method(self):
      """
      Delete all roles except these ones.
      Test and TestNoPermissions are deleted by delete_user above
      """
      session = self.app.appbuilder.get_session
      existing_roles = set(EXISTING_ROLES)
      existing_roles.update(["Test", "TestNoPermissions"])
      roles = (
          session.query(Role)
          .filter(~Role.name.in_(existing_roles))
          .all()
      )
      for role in roles:
          delete_role(self.app, role.name)
  
imports: from __future__ import annotations
  import pytest
  from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP
  from airflow.providers.fab.auth_manager.models import Role
  from airflow.providers.fab.auth_manager.security_manager.override import EXISTING_ROLES
  from airflow.security import permissions
  from tests.test_utils.api_connexion_utils import assert_401, create_role, create_user, delete_role, delete_user
label_desc: Use image node_id 2 for calling the TestRoleEndpoint obj's underlying member method code with example usage: obj.teardown_method() without return types