mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
chore(extensions): clean up backend entrypoints and file globs (#38360)
This commit is contained in:
@@ -81,15 +81,8 @@ def test_extension_json_template_renders_with_both_frontend_and_backend(
|
||||
# Verify frontend section is not present (contributions are code-first)
|
||||
assert "frontend" not in parsed
|
||||
|
||||
# Verify backend section exists
|
||||
assert "backend" in parsed
|
||||
backend = parsed["backend"]
|
||||
assert backend["entryPoints"] == [
|
||||
"superset_extensions.test_org.test_extension.entrypoint"
|
||||
]
|
||||
assert backend["files"] == [
|
||||
"backend/src/superset_extensions/test_org/test_extension/**/*.py"
|
||||
]
|
||||
# Verify no backend section in extension.json (moved to pyproject.toml)
|
||||
assert "backend" not in parsed
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@@ -97,7 +90,7 @@ def test_extension_json_template_renders_with_both_frontend_and_backend(
|
||||
"include_frontend,include_backend,expected_sections",
|
||||
[
|
||||
(True, False, []),
|
||||
(False, True, ["backend"]),
|
||||
(False, True, []),
|
||||
(False, False, []),
|
||||
],
|
||||
)
|
||||
@@ -220,12 +213,7 @@ def test_template_rendering_with_different_ids(
|
||||
assert parsed["publisher"] == publisher
|
||||
assert parsed["name"] == technical_name
|
||||
assert parsed["displayName"] == display_name
|
||||
assert parsed["backend"]["entryPoints"] == [
|
||||
f"superset_extensions.{publisher_snake}.{name_snake}.entrypoint"
|
||||
]
|
||||
assert parsed["backend"]["files"] == [
|
||||
f"backend/src/superset_extensions/{publisher_snake}/{name_snake}/**/*.py"
|
||||
]
|
||||
assert "backend" not in parsed
|
||||
|
||||
# Test package.json template
|
||||
template = jinja_env.get_template("frontend/package.json.j2")
|
||||
|
||||
Reference in New Issue
Block a user