def test_set_configure_apbr_profile_with_app_and_appgroup(self): try: apbr_config.configure_apbr_profile(device=self.mocked_obj, profile="p1", rulename="r1", routing_instance="ri1", app_list=["junos:HTTP", "junos:FTP", "junos:FACEBOOK-CHAT"], appgroup_list=["junos:web:social-networking:applications", "junos:p2p"]) except Exception as err: self.assertEqual(err.args[0], "Application list and application group are mutually exclusive")
def test_set_configure_apbr_profile_with_slarule(self): status = apbr_config.configure_apbr_profile(device=self.mocked_obj, profile="p1", rulename="r1", routing_instance="ri1", appgroup_list=["junos:web:social-networking:applications", "junos:p2p"], sla_rule="sla1") assert status is True
def test_set_configure_apbr_profile_with_app(self): status = apbr_config.configure_apbr_profile(device=self.mocked_obj, profile="p1", rulename="r1", routing_instance="ri1", app_list=["junos:HTTP", "junos:FTP", "junos:FACEBOOK-CHAT"]) assert status is True
def test_set_configure_apbr_profile_without_app_and_appgroup(self): try: apbr_config.configure_apbr_profile(device=self.mocked_obj, profile="p1", rulename="r1", routing_instance="ri1") except Exception as err: self.assertEqual(err.args[0], "Application list or applicaiton group list should not be empty")
def test_set_configure_apbr_profile_without_routing_instance(self): try: apbr_config.configure_apbr_profile(device=self.mocked_obj, profile="p1", rulename="r1") except Exception as err: self.assertEqual(err.args[0], "Routing instance is a mandatory argument")
def test_del_configure_apbr_profile_without_profile_name(self): try: apbr_config.configure_apbr_profile(device=self.mocked_obj, mode="delete") except Exception as err: self.assertEqual(err.args[0], "Profile name is a mandatory argument")
def test_del_configure_apbr_profile_without_device_handle(self): try: apbr_config.configure_apbr_profile(mode="delete") except Exception as err: self.assertEqual(err.args[0], "Device handle is a mandatory argument")
def test_configure_apbr_profile1(self): status = apbr_config.configure_apbr_profile(device=self.mocked_obj, profile="ab",mode="delete") assert status is True