Esempio n. 1
0
# testing BISS
from pprint import pprint
import time
import unittest
from datetime import date
from math import ceil
import scikits.timeseries as ts
import numpy as np

from e4t.load.provider.BISS import BISS
from e4t.utils.DB import openDB,NoConfigFileError

try:
    db = openDB(session_name='DB22',secure=False)
    _working = True
except NoConfigFileError, exc:
    _working = False
    

    
        
@unittest.skipIf(not _working,'skipped')
def test_biss_prod():
        biss = BISS()
        assert biss

@unittest.skipIf(not _working,'skipped')
def test_biss_freq01():
        biss = BISS()
        freq = biss.frequenza('TCNUSAER')
        assert freq==366
Esempio n. 2
0
def test_mysql_version():
    from e4t.utils.DB import openDB
    db,cfg = openDB(session_name='test_mysql')
    result,desc = db.do_query('SELECT VERSION()')
    print result
    assert result[0][0]=='5.0.91-log'
Esempio n. 3
0
File: Flinp.py Progetto: exedre/e4t
 def open(self):
     logger.debug('opening flinp host %s',self._hostname)
     self.db, self.cfg = openDB(session_name=self._hostname,secure=False)
Esempio n. 4
0
import unittest
    
# testing database

# Testing DB Mysql

# Testing DB DB2

# Testing DB Postgres

# Testing DB Oracle

try:
    from e4t.utils.DB import openDB,NoConfigFileError
    db = openDB(session_name='test_mysql',secure=False)
    _working_mysql = True
except NoConfigFileError, exc:
    _working_mysql = False

@unittest.skipIf(not _working_mysql,'skipped')
def test_mysql_version():
    from e4t.utils.DB import openDB
    db,cfg = openDB(session_name='test_mysql')
    result,desc = db.do_query('SELECT VERSION()')
    print result
    assert result[0][0]=='5.0.91-log'

@unittest.skipIf(not _working_mysql,'skipped')
def test_mysql_create_table():
    from e4t.utils.DB import openDB