mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: set up ruff as a new linter/formatter (#28158)
This commit is contained in:
committed by
GitHub
parent
e8a678b75a
commit
2d63722150
@@ -16,6 +16,7 @@
|
||||
# under the License.
|
||||
# isort:skip_file
|
||||
"""Unit tests for Superset"""
|
||||
|
||||
import json
|
||||
import pytest
|
||||
import prison
|
||||
@@ -23,10 +24,10 @@ from datetime import datetime
|
||||
from freezegun import freeze_time
|
||||
from sqlalchemy.sql import func
|
||||
|
||||
import tests.integration_tests.test_app
|
||||
import tests.integration_tests.test_app # noqa: F401
|
||||
from superset import db
|
||||
from superset.models.core import CssTemplate
|
||||
from superset.utils.database import get_example_database
|
||||
from superset.utils.database import get_example_database # noqa: F401
|
||||
|
||||
from tests.integration_tests.base_tests import SupersetTestCase
|
||||
from tests.integration_tests.constants import ADMIN_USERNAME
|
||||
@@ -74,7 +75,7 @@ class TestCssTemplateApi(SupersetTestCase):
|
||||
css_templates = db.session.query(CssTemplate).all()
|
||||
|
||||
self.login(ADMIN_USERNAME)
|
||||
uri = f"api/v1/css_template/"
|
||||
uri = "api/v1/css_template/" # noqa: F541
|
||||
rv = self.get_assert_metric(uri, "get_list")
|
||||
assert rv.status_code == 200
|
||||
data = json.loads(rv.data.decode("utf-8"))
|
||||
@@ -168,7 +169,7 @@ class TestCssTemplateApi(SupersetTestCase):
|
||||
CssTemplate API: Test info
|
||||
"""
|
||||
self.login(ADMIN_USERNAME)
|
||||
uri = f"api/v1/css_template/_info"
|
||||
uri = "api/v1/css_template/_info" # noqa: F541
|
||||
rv = self.get_assert_metric(uri, "info")
|
||||
assert rv.status_code == 200
|
||||
|
||||
@@ -243,7 +244,7 @@ class TestCssTemplateApi(SupersetTestCase):
|
||||
}
|
||||
|
||||
self.login(ADMIN_USERNAME)
|
||||
uri = f"api/v1/css_template/"
|
||||
uri = "api/v1/css_template/" # noqa: F541
|
||||
rv = self.post_assert_metric(uri, post_data, "post")
|
||||
data = json.loads(rv.data.decode("utf-8"))
|
||||
assert rv.status_code == 201
|
||||
|
||||
Reference in New Issue
Block a user