diff --git a/superset/assets/cypress_build.sh b/superset/assets/cypress_build.sh index bb1af41e45dd..70cf797f77f9 100755 --- a/superset/assets/cypress_build.sh +++ b/superset/assets/cypress_build.sh @@ -22,7 +22,6 @@ cd "$(dirname "$0")" #run all the python steps in a background process time superset db upgrade time superset load_test_users -time superset load_examples --load-test-data time superset init echo "[completed python build steps]" flask run -p 8081 --with-threads --reload --debugger & diff --git a/superset/cli.py b/superset/cli.py index cb363c2b5955..292303b634db 100755 --- a/superset/cli.py +++ b/superset/cli.py @@ -81,9 +81,6 @@ def load_examples_run(load_test_data): print("Loading [Birth names]") data.load_birth_names() - print("Loading [Unicode test data]") - data.load_unicode_test_data() - if not load_test_data: print("Loading [Random time series data]") data.load_random_time_series_data() @@ -118,8 +115,11 @@ def load_examples_run(load_test_data): print("Loading DECK.gl demo") data.load_deck_dash() - print("Loading [Tabbed dashboard]") - data.load_tabbed_dashboard() + print("Loading [Tabbed dashboard]") + data.load_tabbed_dashboard() + + print("Loading [Unicode test data]") + data.load_unicode_test_data() @app.cli.command() diff --git a/superset/data/birth_names.py b/superset/data/birth_names.py index 9040847ab07f..a22190f3cb7d 100644 --- a/superset/data/birth_names.py +++ b/superset/data/birth_names.py @@ -388,6 +388,7 @@ def load_birth_names(): if not dash: dash = Dash() + dash.published = True js = textwrap.dedent( # pylint: disable=line-too-long """\ diff --git a/superset/data/deck.py b/superset/data/deck.py index 53445d5af296..3a15c4225462 100644 --- a/superset/data/deck.py +++ b/superset/data/deck.py @@ -499,6 +499,7 @@ def load_deck_dash(): if not dash: dash = Dash() + dash.published = True js = POSITION_JSON pos = json.loads(js) update_slice_ids(pos, slices) diff --git a/superset/data/misc_dashboard.py b/superset/data/misc_dashboard.py index 53aaf6e94687..ba82bd137b36 100644 --- a/superset/data/misc_dashboard.py +++ b/superset/data/misc_dashboard.py @@ -33,6 +33,7 @@ def load_misc_dashboard(): if not dash: dash = Dash() + dash.published = True js = textwrap.dedent( """\ { diff --git a/superset/data/world_bank.py b/superset/data/world_bank.py index a64bd2ba1e9a..870681b583b3 100644 --- a/superset/data/world_bank.py +++ b/superset/data/world_bank.py @@ -328,6 +328,7 @@ def load_world_bank_health_n_pop(): if not dash: dash = Dash() + dash.published = True js = textwrap.dedent( """\ { diff --git a/tests/load_examples_test.py b/tests/load_examples_test.py index 6ca3b2d38f7e..33c58dde76d5 100644 --- a/tests/load_examples_test.py +++ b/tests/load_examples_test.py @@ -32,5 +32,8 @@ def test_load_world_bank_health_n_pop(self): def test_load_birth_names(self): data.load_birth_names() + def test_load_tabbed_dashboard(self): + data.load_tabbed_dashboard() + def test_load_test_users_run(self): load_test_users_run() diff --git a/tox.ini b/tox.ini index 189862e8bba6..c67a1be0c16e 100644 --- a/tox.ini +++ b/tox.ini @@ -55,13 +55,14 @@ whitelist_externals = [testenv:black] commands = black --check setup.py superset tests -deps = +deps = -rrequirements-dev.txt [testenv:cypress-dashboard] commands = npm install -g npm@'>=6.5.0' pip install -e {toxinidir}/ + nosetests tests/load_examples_test.py {toxinidir}/superset/assets/cypress_build.sh dashboard deps = -rrequirements.txt @@ -75,6 +76,7 @@ setenv = commands = npm install -g npm@'>=6.5.0' pip install -e {toxinidir}/ + nosetests tests/load_examples_test.py {toxinidir}/superset/assets/cypress_build.sh explore deps = -rrequirements.txt @@ -88,6 +90,7 @@ setenv = commands = npm install -g npm@'>=6.5.0' pip install -e {toxinidir}/ + nosetests tests/load_examples_test.py {toxinidir}/superset/assets/cypress_build.sh sqllab deps = -rrequirements.txt