docstr: API: Test default missing declaration on put
  
  We want to make sure that not declared edit_columns will
  not accept all columns by default
docstr_tok: ["API",":","Test","default","missing","declaration","on","put","We","want","to","make","sure","that","not","declared","edit_columns","will","not","accept","all","columns","by","default"]
code: def test_default_missing_declaration_put(self):
      """
      API: Test default missing declaration on put
  
      We want to make sure that not declared edit_columns will
      not accept all columns by default
      """
      dashboard = db.session.query(Dashboard).first()
      dashboard_data = {"dashboard_title": "CHANGED", "slug": "CHANGED"}
      self.login(username="admin")
      uri = f"api/v1/model1api/{dashboard.id}"
      rv = self.client.put(uri, json=dashboard_data)
      response = json.loads(rv.data.decode("utf-8"))
      self.assertEqual(rv.status_code, 422)
      expected_response = {
          "message": {
              "dashboard_title": ["Unknown field."],
              "slug": ["Unknown field."],
          }
      }
      self.assertEqual(response, expected_response)
  
imports: import json
  from unittest.mock import patch
  from tests.integration_tests.fixtures.world_bank_dashboard import load_world_bank_dashboard_with_slices, load_world_bank_data
  import pytest
  from flask_appbuilder.models.sqla.interface import SQLAInterface
  import prison
  import tests.integration_tests.test_app
  from superset import db, security_manager
  from superset.extensions import appbuilder
  from superset.models.dashboard import Dashboard
  from superset.views.base_api import BaseSupersetModelRestApi, requires_json
  from .base_tests import SupersetTestCase
  from .conftest import with_config
label_desc: Use image node_id 5 for calling the TestBaseModelRestApi obj's underlying member method code with example usage: obj.test_default_missing_declaration_put() without return types