superset/tests
Christine Chambers 8c0551ed46 [SIP-5] Open a new /api/v1/query endpoint that takes query_obj (#6220)
* [SIP-5] Open a new /api/v1/query endpoint that takes query_obj

- Introduce a new handle_superset_exception decorator to avoid repeating the logic for catching SupersetExceptions
- Create a query_obj_backfill method that takes form_data and constructs a query_obj that will be constructed in the client in the future. Use the backfill in explore_json.
- Create a new /api/v1/query endpoint that takes query_obj only and returns the payload data. Note the query_obj is constructed in the client. The endpoint currently only handles query_obj for table view viz (we'll be adding support to new viz types as we go).
- Unit test to verify the new endpoint for table view

* fix tests and lint errors

* - Move the new query endpoint into its own api.py view.
- Create QueryObject and QueryContext class to encapsulate query_object to be built from the client and additional info (e.g. datasource) needed to get the data payload for a given query
- Remove the query_obj_backfill as we'll start building the first query_object on the client so it no longer makes sense to have a short-lived backfill for the matter of days.

* Fixing lint and test errors

* Fixing additional lint error from the previous rebase.

* fixing additional lint error

* addressing additional pr comments

* Make /query accept a list of queries in the query_context object.

* fixing a lint error

* - Move time_shift based calculation and since, until check into util
- Add typing info for get_since_until
- Add new unit tests to verify time_shift calculation and the since until check
2018-11-07 17:23:52 -08:00
..
fixtures remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
__init__.py Forgot to add some files for unit tests 2015-09-26 15:56:08 -07:00
access_tests.py [utils.py] gathering/refactoring into a "utils/" folder (#6095) 2018-10-16 17:59:34 -07:00
base_tests.py Add separate limit setting for SqlLab (#4941) 2018-11-07 15:57:44 -08:00
cache_tests.py [utils.py] gathering/refactoring into a "utils/" folder (#6095) 2018-10-16 17:59:34 -07:00
celery_tests.py [utils.py] gathering/refactoring into a "utils/" folder (#6095) 2018-10-16 17:59:34 -07:00
core_tests.py [SIP-5] Open a new /api/v1/query endpoint that takes query_obj (#6220) 2018-11-07 17:23:52 -08:00
dashboard_tests.py [utils.py] gathering/refactoring into a "utils/" folder (#6095) 2018-10-16 17:59:34 -07:00
dataframe_test.py remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
datasource_tests.py [utils.py] gathering/refactoring into a "utils/" folder (#6095) 2018-10-16 17:59:34 -07:00
db_engine_specs_test.py remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
dict_import_export_tests.py [utils.py] gathering/refactoring into a "utils/" folder (#6095) 2018-10-16 17:59:34 -07:00
druid_func_tests.py remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
druid_tests.py [utils.py] gathering/refactoring into a "utils/" folder (#6095) 2018-10-16 17:59:34 -07:00
email_tests.py [utils.py] gathering/refactoring into a "utils/" folder (#6095) 2018-10-16 17:59:34 -07:00
form_tests.py remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
import_export_tests.py [utils.py] gathering/refactoring into a "utils/" folder (#6095) 2018-10-16 17:59:34 -07:00
load_examples_test.py Fix examples charts/dashboards and refactor (#5881) 2018-10-31 15:29:04 -07:00
macro_tests.py remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
model_tests.py [utils.py] gathering/refactoring into a "utils/" folder (#6095) 2018-10-16 17:59:34 -07:00
security_tests.py remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
sql_parse_tests.py remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
sqllab_tests.py Add separate limit setting for SqlLab (#4941) 2018-11-07 15:57:44 -08:00
superset_test_config.py remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
utils_tests.py [SIP-5] Open a new /api/v1/query endpoint that takes query_obj (#6220) 2018-11-07 17:23:52 -08:00
utils.py remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
viz_tests.py [utils.py] gathering/refactoring into a "utils/" folder (#6095) 2018-10-16 17:59:34 -07:00