Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: tests/swarm_get_results_test.py

Issue 23431002: [Abandoned] Move url_open with dependencies to utils.net module. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/run_isolated_test.py ('k') | tests/swarm_trigger_step_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/swarm_get_results_test.py
diff --git a/tests/swarm_get_results_test.py b/tests/swarm_get_results_test.py
index b435ce5c53045981d29fc80fc9cfc1944f669501..25e4ea22761125e23bad7d9ee78c55fec4ba503a 100755
--- a/tests/swarm_get_results_test.py
+++ b/tests/swarm_get_results_test.py
@@ -17,8 +17,8 @@ import auto_stub
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, ROOT_DIR)
-import run_isolated
import swarm_get_results
+from utils import net
TEST_CASE_SUCCESS = (
@@ -145,7 +145,7 @@ class TestCase(auto_stub.TestCase):
self._lock = threading.Lock()
self.requests = []
self.mock(
- swarm_get_results.run_isolated, 'url_open',
+ swarm_get_results.net, 'url_open',
self._url_open)
def tearDown(self):
@@ -177,7 +177,7 @@ class TestGetTestKeys(TestCase):
'http://host:9001/get_matching_test_cases?name=my_test',
{'retry_404': True},
StringIO.StringIO('No matching Test Cases'),
- ) for _ in range(run_isolated.URL_OPEN_MAX_ATTEMPTS)
+ ) for _ in range(net.URL_OPEN_MAX_ATTEMPTS)
]
try:
swarm_get_results.get_test_keys('http://host:9001', 'my_test')
@@ -262,7 +262,7 @@ class TestGetSwarmResults(TestCase):
def test_url_errors(self):
# NOTE: get_swarm_results() hardcodes timeout=10. range(12) is because of an
- # additional time.time() call deep in run_isolated.url_open().
+ # additional time.time() call deep in net.url_open().
now = {}
lock = threading.Lock()
def get_now():
@@ -270,7 +270,7 @@ class TestGetSwarmResults(TestCase):
with lock:
return now.setdefault(t, range(12)).pop(0)
self.mock(
- swarm_get_results.run_isolated.HttpService,
+ swarm_get_results.net.HttpService,
'sleep_before_retry',
staticmethod(lambda _x, _y: None))
self.mock(swarm_get_results, 'now', get_now)
« no previous file with comments | « tests/run_isolated_test.py ('k') | tests/swarm_trigger_step_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698