[panoramix] -> [dashed]

This commit is contained in:
Maxime Beauchemin
2016-03-17 23:44:58 -07:00
parent 8f4f5b126a
commit be6b2fe556
143 changed files with 17521 additions and 101 deletions

View File

@@ -2,13 +2,13 @@ import imp
import doctest
import os
import unittest
os.environ['PANORAMIX_CONFIG'] = 'tests.panoramix_test_config'
os.environ['DASHED_CONFIG'] = 'tests.dashed_test_config'
from flask.ext.testing import LiveServerTestCase, TestCase
import panoramix
from panoramix import app, db, models, utils
import dashed
from dashed import app, db, models, utils
BASE_DIR = app.config.get("BASE_DIR")
cli = imp.load_source('cli', BASE_DIR + "/bin/panoramix")
cli = imp.load_source('cli', BASE_DIR + "/bin/dashed")
class LiveTest(TestCase):
@@ -22,7 +22,7 @@ class LiveTest(TestCase):
pass
def test_init(self):
utils.init(panoramix)
utils.init(dashed)
def test_load_examples(self):
cli.load_examples(sample=True)
@@ -39,7 +39,7 @@ class LiveTest(TestCase):
self.client.get(viz.get_json())
def test_csv(self):
self.client.get('/panoramix/explore/table/1/?viz_type=table&granularity=ds&since=100+years&until=now&metrics=count&groupby=name&limit=50&show_brush=y&show_brush=false&show_legend=y&show_brush=false&rich_tooltip=y&show_brush=false&show_brush=false&show_brush=false&show_brush=false&y_axis_format=&x_axis_showminmax=y&show_brush=false&line_interpolation=linear&rolling_type=None&rolling_periods=&time_compare=&num_period_compare=&where=&having=&flt_col_0=gender&flt_op_0=in&flt_eq_0=&flt_col_0=gender&flt_op_0=in&flt_eq_0=&slice_id=14&slice_name=Boys&collapsed_fieldsets=&action=&datasource_name=birth_names&datasource_id=1&datasource_type=table&previous_viz_type=line&csv=true')
self.client.get('/dashed/explore/table/1/?viz_type=table&granularity=ds&since=100+years&until=now&metrics=count&groupby=name&limit=50&show_brush=y&show_brush=false&show_legend=y&show_brush=false&rich_tooltip=y&show_brush=false&show_brush=false&show_brush=false&show_brush=false&y_axis_format=&x_axis_showminmax=y&show_brush=false&line_interpolation=linear&rolling_type=None&rolling_periods=&time_compare=&num_period_compare=&where=&having=&flt_col_0=gender&flt_op_0=in&flt_eq_0=&flt_col_0=gender&flt_op_0=in&flt_eq_0=&slice_id=14&slice_name=Boys&collapsed_fieldsets=&action=&datasource_name=birth_names&datasource_id=1&datasource_type=table&previous_viz_type=line&csv=true')
def test_dashboard(self):
for dash in db.session.query(models.Dashboard).all():

View File

@@ -0,0 +1,6 @@
from dashed.config import *
AUTH_USER_REGISTRATION_ROLE = 'alpha'
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/dashed_unittests.db'
DEBUG = True
DASHED_WEBSERVER_PORT = 8081