docstr: Test that they keys in the YAML have the same order as export_fields
docstr_tok: ["Test","that","they","keys","in","the","YAML","have","the","same","order","as","export_fields"]
code: def test_export_query_command_key_order(self, mock_g):
      """Test that they keys in the YAML have the same order as export_fields"""
      mock_g.user = security_manager.find_user("admin")
  
      command = ExportSavedQueriesCommand([self.example_query.id])
      contents = dict(command.run())
  
      metadata = yaml.safe_load(
          contents["queries/examples/schema1/The_answer.yaml"]
      )
      assert list(metadata.keys()) == [
          "schema",
          "label",
          "description",
          "sql",
          "uuid",
          "version",
          "database_uuid",
      ]
  
imports: from unittest.mock import patch
  import pytest
  import yaml
  from superset import db, security_manager
  from superset.commands.exceptions import CommandInvalidError
  from superset.commands.importers.exceptions import IncorrectVersionError
  from superset.commands.query.exceptions import SavedQueryNotFoundError
  from superset.commands.query.export import ExportSavedQueriesCommand
  from superset.commands.query.importers.v1 import ImportSavedQueriesCommand
  from superset.models.core import Database
  from superset.models.sql_lab import SavedQuery
  from superset.utils.database import get_example_database
  from tests.integration_tests.base_tests import SupersetTestCase
  from tests.integration_tests.fixtures.importexport import database_config, database_metadata_config, saved_queries_config, saved_queries_metadata_config
label_desc: Use image node_id 7 for calling the TestExportSavedQueriesCommand obj's underlying member method code with example usage: obj.test_export_query_command_key_order(mock_g) without return types