From commits-return-2054-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Fri Jan 11 03:22:17 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 81866180679 for ; Fri, 11 Jan 2019 03:22:16 +0100 (CET) Received: (qmail 6251 invoked by uid 500); 11 Jan 2019 02:22:07 -0000 Mailing-List: contact commits-help@superset.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.incubator.apache.org Delivered-To: mailing list commits@superset.incubator.apache.org Received: (qmail 6157 invoked by uid 99); 11 Jan 2019 02:22:07 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2019 02:22:07 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 4CCE087044; Fri, 11 Jan 2019 02:22:07 +0000 (UTC) Date: Fri, 11 Jan 2019 02:22:37 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] 33/43: fixed tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: johnbodley@apache.org In-Reply-To: <154717332450.605.1618987592169557933@gitbox.apache.org> References: <154717332450.605.1618987592169557933@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/feature--embeddable-charts-pilot X-Git-Reftype: branch X-Git-Rev: 4adefbcb9cdc2e041318ff4ddfe1bd22f66aa82d X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20190111022207.4CCE087044@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. johnbodley pushed a commit to branch feature--embeddable-charts-pilot in repository https://gitbox.apache.org/repos/asf/incubator-superset.git commit 4adefbcb9cdc2e041318ff4ddfe1bd22f66aa82d Author: Conglei Shi AuthorDate: Fri Dec 14 16:04:41 2018 -0800 fixed tests --- superset/viz.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/superset/viz.py b/superset/viz.py index 4a89a98..ed6f43b 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -183,7 +183,7 @@ class BaseViz(object): return fillna def get_samples(self): - query_obj = self._query_obj() + query_obj = self.query_obj() query_obj.update({ 'groupby': [], 'metrics': [], @@ -196,7 +196,7 @@ class BaseViz(object): def get_df(self, query_obj=None): """Returns a pandas dataframe based on the query object""" if not query_obj: - query_obj = self._query_obj() + query_obj = self.query_obj() if not query_obj: return None @@ -267,7 +267,6 @@ class BaseViz(object): }) return query_obj - def _query_obj(self): """Building a query object""" form_data = self.form_data @@ -396,7 +395,7 @@ class BaseViz(object): def get_df_payload(self, query_obj=None, **kwargs): """Handles caching around the df payload retrieval""" if not query_obj: - query_obj = self._query_obj() + query_obj = self.query_obj() cache_key = self.cache_key(query_obj, **kwargs) if query_obj else None logging.info('Cache key: {}'.format(cache_key)) is_loaded = False @@ -1210,7 +1209,7 @@ class NVD3TimeSeriesViz(NVD3Viz): time_compare = [time_compare] for option in time_compare: - query_object = self._query_obj() + query_object = self.query_obj() delta = utils.parse_human_timedelta(option) query_object['inner_from_dttm'] = query_object['from_dttm'] query_object['inner_to_dttm'] = query_object['to_dttm']