docstr: API: Test default missing declaration on post
  
  We want to make sure that not declared add_columns will
  not accept all columns by default
docstr_tok: ["API",":","Test","default","missing","declaration","on","post","We","want","to","make","sure","that","not","declared","add_columns","will","not","accept","all","columns","by","default"]
code: def test_default_missing_declaration_post(self):
      """
      API: Test default missing declaration on post
  
      We want to make sure that not declared add_columns will
      not accept all columns by default
      """
      dashboard_data = {
          "dashboard_title": "title1",
          "slug": "slug1",
          "position_json": '{"a": "A"}',
          "css": "css",
          "json_metadata": '{"b": "B"}',
          "published": True,
      }
      self.login(username="admin")
      uri = "api/v1/model1api/"
      rv = self.client.post(uri, json=dashboard_data)
      response = json.loads(rv.data.decode("utf-8"))
      self.assertEqual(rv.status_code, 422)
      expected_response = {
          "message": {
              "css": ["Unknown field."],
              "dashboard_title": ["Unknown field."],
              "json_metadata": ["Unknown field."],
              "position_json": ["Unknown field."],
              "published": ["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 3 for calling the TestBaseModelRestApi obj's underlying member method code with example usage: obj.test_default_missing_declaration_post() without return types