Пример #1
0
def _check_apache():
    try:
        if getservbyport(apache_port) not in ['http', 'www', 'apache2']:
            exit('Apache does not seem to be running on port %d' % apache_port)
    except Exception:
        exit('Error while trying to poll for apache, please check the config setting apache->port')
 def test_getservbyport(self):
     self.assertEqual(_socket.getservbyport(80), "http")
Пример #3
0
 def test_getservbyport(self):
     self.assertEqual(_socket.getservbyport(80), "http")