docstr: Annotation Api: Test delete annotation layer integrity error
docstr_tok: ["Annotation","Api",":","Test","delete","annotation","layer","integrity","error"]
code: def test_delete_annotation_layer_integrity(self):
      """
      Annotation Api: Test delete annotation layer integrity error
      """
      query_child_layer = db.session.query(AnnotationLayer).filter(
          AnnotationLayer.name == "layer_with_annotations"
      )
      child_layer = query_child_layer.one_or_none()
      self.login(username="admin")
      uri = f"api/v1/annotation_layer/{child_layer.id}"
      rv = self.client.delete(uri)
      assert rv.status_code == 422
  
imports: import json
  import pytest
  import prison
  from sqlalchemy.sql import func
  import tests.integration_tests.test_app
  from superset import db
  from superset.models.annotations import Annotation, AnnotationLayer
  from tests.integration_tests.base_tests import SupersetTestCase
  from tests.integration_tests.annotation_layers.fixtures import create_annotation_layers, get_end_dttm, get_start_dttm
  from tests.unit_tests.annotation_layers.fixtures import START_STR, END_STR
label_desc: Use image node_id 17 for calling the TestAnnotationLayerApi obj's underlying member method code with example usage: obj.test_delete_annotation_layer_integrity() without return types