diff --git a/tests/console/Bulk_operations.py b/tests/console/Bulk_operations.py index 72ab2c0c43..d13645f87c 100644 --- a/tests/console/Bulk_operations.py +++ b/tests/console/Bulk_operations.py @@ -198,5 +198,47 @@ class Bulk_operations(PandoraWebDriverTestCase): self.assertRegexpMatches(self.close_alert_and_get_its_text(), r"^Are you sure[\s\S]$") + +def test_F_edit_module_umbral_in_bulk(self): + + u""" + Create two agents and one module in this agents. With bulk operation, change module umbral with bulk operation + """ + + agent_name_1 = gen_random_string(6) + agent_name_2 = gen_random_string(6) + + module_name_1 = gen_random_string(6) + + driver = self.driver + + activate_api(driver,"1234") + + params = [agent_name_1,"127.0.0.1","0","4","0","300","2","pandorafms","2","0","0","pruebas"] + create_agent_api(driver,params,user="admin",pwd="pandora") + + params = [agent_name_2,"127.0.0.1","0","4","0","300","2","pandorafms","2","0","0","pruebas"] + create_agent_api(driver,params,user="admin",pwd="pandora") + + params = [agent_name_1,module_name_1,"0","6","1","0","0","0","0","0","0","0","0","129.99.40.1","0","0","180","0","0","0","0","Host_Alive"] + add_network_module_to_agent_api(driver,params,user="admin",pwd="pandora",apipwd="1234") + + params = [agent_name_2,module_name_1,"0","6","1","0","0","0","0","0","0","0","0","129.99.40.1","0","0","180","0","0","0","0","Host_Alive"] + add_network_module_to_agent_api(driver,params,user="admin",pwd="pandora",apipwd="1234") + + lista = driver.current_url.split('/') + + url = lista[0]+'//'+lista[2]+'/pandora_console' + + driver.get(url) + + agent_name_list = [agent_name_1,agent_name_2] + + module_name_list = [module_name_1] + + edit_modules_in_bulk(driver,module_name_list,agent_name_list,new_min="1",new_max="2") + + self.assertRegexpMatches(self.close_alert_and_get_its_text(), r"^Are you sure[\s\S]$") + if __name__ == "__main__": unittest.main()