You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
683 B
Python
26 lines
683 B
Python
6 years ago
|
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()
|