def test_create_w_config(udp_config): monitor = target.UDPMonitor(**udp_config) assert monitor assert monitor.name == "test_monitor" assert monitor.partition == "Test" data = monitor.data assert data.get('interval') == 1 assert data.get('timeout') == 10 assert data.get('send') == "GET /\r\n" assert data.get('recv') == "SERVER"
def test_create_w_defaults(udp_config): monitor = target.UDPMonitor(name=udp_config['name'], partition=udp_config['partition']) assert monitor assert monitor.name == "test_monitor" assert monitor.partition == "Test" data = monitor.data assert data.get('interval') == 5 assert data.get('timeout') == 16 assert data.get('send') == "" assert data.get('recv') == ""
def test_get_uri_path(bigip, udp_config): monitor = target.UDPMonitor(**udp_config) assert (monitor._uri_path(bigip) == bigip.tm.ltm.monitor.udps.udp)