superset/tests
Maxime Beauchemin 2314aad450
feat: add database dropdown to dashboard import (#10118)
* feat: add database dropdown to dashboard import

Currently, when importing a database from a JSON file, the process
looks at the database name from the source (the info is in the file)
and matches the datasources to that name. If no database by that name
exists, it simply fails.

With this PR, we add a database dropdown that allows the user to specify
which databases the datasources should target as the get upserted.

I want to stress that the code in this area is not in a great shape,
and that the challenge of serializing/deser the nested objects is
challenging, but that there should be a much better way to do this.
One of the improvement (out of scope for this PR) that would allow to
simplify those import/export would be to use UUIDs for
importable/exportable objects.

Another identified issue is the indirections between
`utils/import_expor_{model}.py` on top of `{Model}.import_object`. Not
addressing that here.

Next topic is the MVC stuff. Decided to stick with it for now as this is
more of a [obious missing feat:] than a rewrite.

* isort \!? 0%^$%Y$&?%$^?%0^?

* fix tests

* pre-committing to py3.6

* address dpgaspar's comments

* revert isort
2020-07-05 15:08:37 -07:00
..
charts feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
dashboards feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
datasets feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
db_engine_specs feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
fixtures feat: Add geospatial post processing operations (#9661) 2020-04-28 20:15:16 +03:00
queries feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
security feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
__init__.py Add licenses to translations (#6732) 2019-01-22 08:21:13 -08:00
access_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
base_api_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
base_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
cache_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
celery_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
config_tests.py s/assertEqual/assertEquals (#10195) 2020-06-29 16:38:06 -07:00
core_tests.py s/assertEqual/assertEquals (#10195) 2020-06-29 16:38:06 -07:00
dashboard_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
database_api_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
dataframe_test.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
datasource_tests.py s/assertEqual/assertEquals (#10195) 2020-06-29 16:38:06 -07:00
dict_import_export_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
druid_func_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
druid_func_tests_sip38.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
druid_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
email_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
event_logger_tests.py Event logger config takes instance instead of class (#7997) 2019-08-08 13:47:18 -07:00
feature_flag_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
form_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
import_export_tests.py feat: add database dropdown to dashboard import (#10118) 2020-07-05 15:08:37 -07:00
jinja_context_tests.py s/assertEqual/assertEquals (#10195) 2020-06-29 16:38:06 -07:00
load_examples_test.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
log_api_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
logging_configurator_tests.py Add LogConfigurator, and add logging for CSV export (#8085) 2019-08-27 13:22:18 -07:00
migration_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
model_tests.py s/assertEqual/assertEquals (#10195) 2020-06-29 16:38:06 -07:00
pandas_postprocessing_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
query_context_tests.py s/assertEqual/assertEquals (#10195) 2020-06-29 16:38:06 -07:00
result_set_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
schedules_test.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
security_tests.py s/assertEqual/assertEquals (#10195) 2020-06-29 16:38:06 -07:00
sql_parse_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
sql_validator_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
sqla_models_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
sqllab_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
stats_logger_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
strategy_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
superset_test_config.py fix: annotation layer json (#9915) 2020-05-27 09:02:03 -07:00
superset_test_config_sqllab_backend_persist.py [Build] Add Github workflows (#9517) 2020-04-14 13:38:09 -07:00
superset_test_config_thumbnails.py style(mypy): Spit-and-polish pass (#10001) 2020-06-07 08:53:46 -07:00
superset_test_custom_template_processors.py [sqllab] Add CUSTOM_TEMPLATE_PROCESSOR config (#9376) 2020-04-07 21:00:42 +01:00
tagging_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
test_app.py Flask App factory PR #1 (#8418) 2019-11-20 15:47:06 +00:00
thumbnails_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00
utils.py [format] Using Black (#7769) 2019-06-25 13:34:48 -07:00
utils_tests.py [log] Updating form-data logic (#10197) 2020-07-04 12:51:43 -07:00
viz_tests.py feat: Switch from nosetest to pytest (#10177) 2020-06-29 15:36:06 -07:00