mirror of
https://github.com/apache/superset.git
synced 2026-04-24 18:44:53 +00:00
chore(tests): Spelling (#25454)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: Evan Rusackas <evan@preset.io> Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
This commit is contained in:
@@ -55,11 +55,11 @@ def test_extract_errors() -> None:
|
||||
|
||||
from superset.db_engine_specs.athena import AthenaEngineSpec
|
||||
|
||||
msg = ": mismatched input 'fromm'. Expecting: "
|
||||
msg = ": mismatched input 'from_'. Expecting: "
|
||||
result = AthenaEngineSpec.extract_errors(Exception(msg))
|
||||
assert result == [
|
||||
SupersetError(
|
||||
message='Please check your query for syntax errors at or near "fromm". Then, try running your query again.',
|
||||
message='Please check your query for syntax errors at or near "from_". Then, try running your query again.',
|
||||
error_type=SupersetErrorType.SYNTAX_ERROR,
|
||||
level=ErrorLevel.ERROR,
|
||||
extra={
|
||||
|
||||
@@ -178,12 +178,12 @@ def test_extract_errors() -> None:
|
||||
Test that custom error messages are extracted correctly.
|
||||
"""
|
||||
|
||||
msg = ": mismatched input 'fromm'. Expecting: "
|
||||
msg = ": mismatched input 'from_'. Expecting: "
|
||||
result = DatabricksNativeEngineSpec.extract_errors(Exception(msg))
|
||||
|
||||
assert result == [
|
||||
SupersetError(
|
||||
message=": mismatched input 'fromm'. Expecting: ",
|
||||
message=": mismatched input 'from_'. Expecting: ",
|
||||
error_type=SupersetErrorType.GENERIC_DB_ENGINE_ERROR,
|
||||
level=ErrorLevel.ERROR,
|
||||
extra={
|
||||
@@ -204,13 +204,13 @@ def test_extract_errors_with_context() -> None:
|
||||
Test that custom error messages are extracted correctly with context.
|
||||
"""
|
||||
|
||||
msg = ": mismatched input 'fromm'. Expecting: "
|
||||
msg = ": mismatched input 'from_'. Expecting: "
|
||||
context = {"hostname": "foo"}
|
||||
result = DatabricksNativeEngineSpec.extract_errors(Exception(msg), context)
|
||||
|
||||
assert result == [
|
||||
SupersetError(
|
||||
message=": mismatched input 'fromm'. Expecting: ",
|
||||
message=": mismatched input 'from_'. Expecting: ",
|
||||
error_type=SupersetErrorType.GENERIC_DB_ENGINE_ERROR,
|
||||
level=ErrorLevel.ERROR,
|
||||
extra={
|
||||
|
||||
@@ -94,7 +94,7 @@ def test_where_clause_n_prefix() -> None:
|
||||
assert query == query_expected
|
||||
|
||||
|
||||
def test_time_exp_mixd_case_col_1y() -> None:
|
||||
def test_time_exp_mixed_case_col_1y() -> None:
|
||||
from superset.db_engine_specs.mssql import MssqlEngineSpec
|
||||
|
||||
col = column("MixedCase")
|
||||
@@ -291,14 +291,14 @@ def test_extract_errors() -> None:
|
||||
msg = dedent(
|
||||
"""
|
||||
DB-Lib error message 20009, severity 9:
|
||||
Unable to connect: Adaptive Server is unavailable or does not exist (locahost)
|
||||
Unable to connect: Adaptive Server is unavailable or does not exist (localhost_)
|
||||
"""
|
||||
)
|
||||
result = MssqlEngineSpec.extract_errors(Exception(msg))
|
||||
assert result == [
|
||||
SupersetError(
|
||||
error_type=SupersetErrorType.CONNECTION_INVALID_HOSTNAME_ERROR,
|
||||
message='The hostname "locahost" cannot be resolved.',
|
||||
message='The hostname "localhost_" cannot be resolved.',
|
||||
level=ErrorLevel.ERROR,
|
||||
extra={
|
||||
"engine_name": "Microsoft SQL Server",
|
||||
|
||||
Reference in New Issue
Block a user