from utils import transport import unittest import json import os from models import model, factory import pandas as pd path = os.environ['CONFIG_PATH'] f = open(path) CONFIG = json.loads( f.read()) CONFIG['store']['args']['uid'] = 'cus_D2x3ItYNfWjSY3' f.close() dfactory = transport.DataSourceFactory() reader = dfactory.instance(type='CouchdbReader',args = CONFIG['store']['args']) class TestModel(unittest.TestCase): def setUp(self): self.document = reader.read() self.models = [] def test_ScatterPlot(self): r = reader.view('clients/logs',key=CONFIG['store']['args']['uid']) print factory.instance('free',data=r) pass if __name__ == '__main__' : unittest.main()