docstr: Annotation Api: Test filters on get list annotation layers
docstr_tok: ["Annotation","Api",":","Test","filters","on","get","list","annotation","layers"]
code: def test_get_list_annotation_filter(self):
      """
      Annotation Api: Test filters on get list annotation layers
      """
      layer = self.get_layer_with_annotation()
      self.login(username="admin")
      arguments = {
          "filters": [
              {
                  "col": "short_descr",
                  "opr": "annotation_all_text",
                  "value": "2",
              }
          ]
      }
      uri = f"api/v1/annotation_layer/{layer.id}/annotation/?q={prison.dumps(arguments)}"
      rv = self.get_assert_metric(uri, "get_list")
  
      assert rv.status_code == 200
      data = json.loads(rv.data.decode("utf-8"))
      assert data["count"] == 1
  
      arguments = {
          "filters": [
              {
                  "col": "short_descr",
                  "opr": "annotation_all_text",
                  "value": "descr3",
              }
          ]
      }
      uri = f"api/v1/annotation_layer/{layer.id}/annotation/?q={prison.dumps(arguments)}"
      rv = self.get_assert_metric(uri, "get_list")
  
      assert rv.status_code == 200
      data = json.loads(rv.data.decode("utf-8"))
      assert data["count"] == 1
  
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 24 for calling the TestAnnotationLayerApi obj's underlying member method code with example usage: obj.test_get_list_annotation_filter() without return types