mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix: import ZIP files that have been modified (#12425)
* fix: import ZIP files that have been modified * Add unit test
This commit is contained in:
committed by
Ville Brofeldt
parent
696c9773bd
commit
78e4b02305
@@ -17,6 +17,7 @@
|
||||
# pylint: disable=no-self-use
|
||||
|
||||
from superset.commands.exceptions import CommandInvalidError
|
||||
from superset.commands.importers.v1.utils import is_valid_config
|
||||
from tests.base_tests import SupersetTestCase
|
||||
|
||||
|
||||
@@ -24,3 +25,13 @@ class TestCommandsExceptions(SupersetTestCase):
|
||||
def test_command_invalid_error(self):
|
||||
exception = CommandInvalidError("A test")
|
||||
assert str(exception) == "A test"
|
||||
|
||||
|
||||
class TestImportersV1Utils(SupersetTestCase):
|
||||
def test_is_valid_config(self):
|
||||
assert is_valid_config("metadata.yaml")
|
||||
assert is_valid_config("databases/examples.yaml")
|
||||
assert not is_valid_config(".DS_Store")
|
||||
assert not is_valid_config(
|
||||
"__MACOSX/chart_export_20210111T145253/databases/._examples.yaml"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user