예제 #1
0
파일: testcase_dmz.py 프로젝트: zeewii/BHU
 def test_dmz_udp(self):
     dmz_business.set_status_enable(self)
     dmz_control.set_host(self,host1)
     dmz_business.set_udp_protocol(self)
     dmz_control.set_port(self,port1)
     dmz_control.dmz_apply(self)
     dmz_business.iptables_nat(self,host1)
예제 #2
0
파일: testcase_dmz.py 프로젝트: zeewii/BHU
 def test_dmz_icmp(self):
     dmz_business.set_status_enable(self)
     dmz_control.set_host(self,host1)
     dmz_business.set_icmp_protocol(self)
     dmz_control.dmz_apply(self)
     dmz_business.iptables_nat(self,host1)
     dmz_business.set_status_disable(self)                #测试DMZ策略禁用后是否生效
     dmz_control.dmz_apply(self)
     time.sleep(4)
     dmz_business.iptables_dmz_disable(self,host1)       #测试DMZ策略禁用后是否生效
예제 #3
0
파일: testcase_dmz.py 프로젝트: zeewii/BHU
 def tearDown(self):
     #每次密码都要改回原来的,防止前面的错误导致后面的用例运行错误
     dmz_business.set_status_disable(self)
     dmz_control.dmz_apply(self)
     time.sleep(4)
     self.driver.quit()