refactor: pass all properties to validate_parameters (#21487)

This commit is contained in:
Elizabeth Thompson
2022-10-03 17:48:54 -07:00
committed by GitHub
parent 4417c6e3e2
commit e98943e580
11 changed files with 109 additions and 74 deletions

View File

@@ -22,6 +22,7 @@ from typing import Any
from uuid import UUID
import pytest
from pytest_mock import MockFixture
from sqlalchemy.orm.session import Session
@@ -53,6 +54,7 @@ def test_post_with_uuid(
def test_password_mask(
mocker: MockFixture,
app: Any,
session: Session,
client: Any,
@@ -92,6 +94,10 @@ def test_password_mask(
session.add(database)
session.commit()
# mock the lookup so that we don't need to include the driver
mocker.patch("sqlalchemy.engine.URL.get_driver_name", return_value="gsheets")
mocker.patch("superset.utils.log.DBEventLogger.log")
response = client.get("/api/v1/database/1")
assert (
response.json["result"]["parameters"]["service_account_info"]["private_key"]