def tearDownClass(cls):
     DBService_Case.update_runmode(
         dbname=oracle_dict['objName'],
         runmode=db_dict['updatedbserver']['runmode']['正式'])
     for name in gp.dbnamelist():
         DBSecurityconf_Case.update_switch(featuresStatus=1,
                                           virStatus=0,
                                           name=name)
     time.sleep(30)
 def setUpClass(cls):
     for name in gp.dbnamelist():
         DBSecurityconf_Case.update_switch(featuresStatus=1,
                                           virStatus=0,
                                           name=name)
     time.sleep(30)
 def tearDownClass(cls):
     for name in gp.dbnamelist():
         DBService_Case.update_runmode(dbname=name,
                                   runmode=db_dict['updatedbserver']['runmode']['正式'])
Exemple #4
0
from casemap import Virtualpatch_Case, SqlInject_Case, DBSecurityconf_Case
from public import commen
import time
import global_params as gp
import unittest

namelist = gp.dbnamelist()


class Configdb1(unittest.TestCase):
    def test_setconfig(self):
        '''数据库配置:关掉sql特征库'''
        print(namelist)
        for name in namelist:
            DBSecurityconf_Case.update_switch(featuresStatus=0,
                                              virStatus=0,
                                              name=name)
        time.sleep(30)