docstr: API: Test default missing declaration on get
  
  We want to make sure that not declared list_columns will
  not render all columns by default but just the model's pk
docstr_tok: ["API",":","Test","default","missing","declaration","on","get","We","want","to","make","sure","that","not","declared","list_columns","will","not","render","all","columns","by","default","but","just","the","model","'s","pk"]
code: def test_default_missing_declaration_get(self):
      """
      API: Test default missing declaration on get
  
      We want to make sure that not declared list_columns will
      not render all columns by default but just the model's pk
      """
      # Check get list response
      self.login(username="admin")
      uri = "api/v1/model1api/"
      rv = self.client.get(uri)
      self.assertEqual(rv.status_code, 200)
      response = json.loads(rv.data.decode("utf-8"))
      self.assertEqual(response["list_columns"], ["id"])
      for result in response["result"]:
          self.assertEqual(list(result.keys()), ["id"])
  
      # Check get response
      dashboard = db.session.query(Dashboard).first()
      uri = f"api/v1/model1api/{dashboard.id}"
      rv = self.client.get(uri)
      self.assertEqual(rv.status_code, 200)
      response = json.loads(rv.data.decode("utf-8"))
      self.assertEqual(response["show_columns"], ["id"])
      self.assertEqual(list(response["result"].keys()), ["id"])
  
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 1 for calling the TestBaseModelRestApi obj's underlying member method code with example usage: obj.test_default_missing_declaration_get() without return types