diff --git a/tests/unit/helpers.py b/tests/unit/helpers.py index 578e9096..efd8046e 100644 --- a/tests/unit/helpers.py +++ b/tests/unit/helpers.py @@ -1,4 +1,5 @@ # coding: utf-8 + import BaseHTTPServer import copy import json @@ -8,8 +9,10 @@ import socket import unittest -from nose.twistedtools import reactor from mock import Mock, patch +from nose.twistedtools import reactor + +from core.utils.network_utils import get_socket class TimeoutException(Exception): @@ -87,8 +90,6 @@ def vmmaster_label(address, session, label=None): "/wd/hub/session/%s/vmmaster/vmmasterLabel" % str(session), body=json.dumps({"label": label})) -from core.utils.network_utils import get_socket - def server_is_up(address, wait=5): s = get_socket(address[0], address[1]) @@ -230,5 +231,4 @@ def vmmaster_server_mock(port): def request_mock(**kwargs): - time.sleep(2) return Mock(status_code=200, headers={}, content=json.dumps({'status': 0})) diff --git a/tests/unit/test_server.py b/tests/unit/test_server.py index befe6413..66fd86f2 100644 --- a/tests/unit/test_server.py +++ b/tests/unit/test_server.py @@ -888,7 +888,6 @@ def get_vm_mock(arg): response = new_session_request(self.address, self.desired_caps) self.assertEqual(200, response.status) - time.sleep(2) response = get_session_request(self.address, 1) self.assertIn(