<s> """<STR_LIT>""" <EOL> import unittest <EOL> from pywps import configuration <EOL> from pywps . dblog import get_connection , check_db_table , check_db_columns <EOL> class DBLogTest ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> self . database = configuration . get_config_value ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> if not self . database : <EOL> self . database = '<STR_LIT>' <EOL> def test_0_dblog ( self ) : <EOL> """<STR_LIT>""" <EOL> connection = get_connection ( ) <EOL> self . assertTrue ( connection ) <EOL> self . assertTrue ( check_db_table ( connection ) ) <EOL> def test_db_content ( self ) : <EOL> connection = get_connection ( ) <EOL> cur = connection . cursor ( ) <EOL> cur . execute ( "<STR_LIT>" ) <EOL> null_time_end = cur . fetchall ( ) <EOL> self . assertEqual ( len ( null_time_end ) , <NUM_LIT:0> , <EOL> '<STR_LIT>' ) <EOL> cur . execute ( "<STR_LIT>" ) <EOL> null_status = cur . fetchall ( ) <EOL> self . assertEqual ( len ( null_status ) , <NUM_LIT:0> , <EOL> '<STR_LIT>' ) <EOL> cur . execute ( "<STR_LIT>" ) <EOL> null_percent = cur . fetchall ( ) <EOL> self . assertEqual ( len ( null_percent ) , <NUM_LIT:0> , <EOL> '<STR_LIT>' ) <EOL> def load_tests ( loader = None , tests = None , pattern = None ) : <EOL> """<STR_LIT>""" <EOL> if not loader : <EOL> loader = unittest . TestLoader ( ) <EOL> suite_list = [ <EOL> loader . loadTestsFromTestCase ( DBLogTest ) <EOL> ] <EOL> return unittest . TestSuite ( suite_list ) </s>
