docstr: DB Eng Specs (postgres): Test estimate_statement_cost invalid syntax
docstr_tok: ["DB","Eng","Specs","(","postgres",")",":","Test","estimate_statement_cost","invalid","syntax"]
code: def test_estimate_statement_invalid_syntax(self):
      """
      DB Eng Specs (postgres): Test estimate_statement_cost invalid syntax
      """
      from psycopg2 import errors
  
      cursor = mock.Mock()
      cursor.execute.side_effect = errors.SyntaxError(
          """
              syntax error at or near "EXPLAIN"
              LINE 1: EXPLAIN DROP TABLE birth_names
                              ^
              """
      )
      sql = "DROP TABLE birth_names"
      with self.assertRaises(errors.SyntaxError):
          PostgresEngineSpec.estimate_statement_cost(sql, cursor)
  
imports: from textwrap import dedent
  from unittest import mock
  from flask.ctx import AppContext
  from sqlalchemy import column, literal_column
  from sqlalchemy.dialects import postgresql
  from superset.db_engine_specs import load_engine_specs
  from superset.db_engine_specs.postgres import PostgresEngineSpec
  from superset.errors import ErrorLevel, SupersetError, SupersetErrorType
  from superset.models.sql_lab import Query
  from superset.utils.database import get_example_database
  from tests.integration_tests.db_engine_specs.base_tests import TestDbEngineSpec
  from tests.integration_tests.fixtures.certificates import ssl_certificate
  from tests.integration_tests.fixtures.database import default_db_extra
label_desc: Use image node_id 13 for calling the TestPostgresDbEngineSpec obj's underlying member method code with example usage: obj.test_estimate_statement_invalid_syntax() without return types