Browse Source

PR fixes

opensearch
Roi Rav-Hon 8 years ago
parent
commit
011a18439f
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      tests/mockLogzioListener/listener.py

+ 2
- 2
tests/mockLogzioListener/listener.py View File

@ -41,7 +41,7 @@ class ListenerHandler(BaseHTTPRequestHandler):
class MockLogzioListener: class MockLogzioListener:
def __init__(self): def __init__(self):
self.port = find_available_port()
self.port = _find_available_port()
self.host = "localhost" self.host = "localhost"
self.server = HTTPServer((self.host, self.port), ListenerHandler) self.server = HTTPServer((self.host, self.port), ListenerHandler)
@ -82,7 +82,7 @@ class MockLogzioListener:
self.persistent_flags.clear_server_error() self.persistent_flags.clear_server_error()
def find_available_port():
def _find_available_port():
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(("", 0)) sock.bind(("", 0))
sock.listen(1) sock.listen(1)


Loading…
Cancel
Save