def test__validate_not_existing_listener(self):
    with self.assertRaises(AssertionError):
        self.c._validate_not_existing_listener('thing', 1024)
    self.c._validate_not_existing_listener('udp', 1024)
    self.c._listeners = {('udp', 1024): None}
    with self.assertRaises(RuntimeError):
        self.c._validate_not_existing_listener('udp', 1024)
    self.c._validate_not_existing_listener('udp', 1023)
def test__validate_not_existing_listener(self):
    with self.assertRaises(AssertionError):
        self.c._validate_not_existing_listener('thing', 1024)
    self.c._validate_not_existing_listener('udp', 1024)
    self.c._listeners = {('udp', 1024): None}
    with self.assertRaises(RuntimeError):
        self.c._validate_not_existing_listener('udp', 1024)
    self.c._validate_not_existing_listener('udp', 1023)