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

Unified Diff: appengine/findit/crash/test/crash_testcase.py

Issue 2432203003: [Predator] Run predator. (Closed)
Patch Set: Rebase. Created 4 years, 1 month 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 | « appengine/findit/crash/findit.py ('k') | appengine/findit/handlers/crash/crash_handler.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/crash/test/crash_testcase.py
diff --git a/appengine/findit/crash/test/crash_testcase.py b/appengine/findit/crash/test/crash_testcase.py
index e8ac6cd60c18652ea043407bb4df3e3f5843c5e9..79ac67fd3c77d58f6343d0aedeff7f3fd468ec57 100644
--- a/appengine/findit/crash/test/crash_testcase.py
+++ b/appengine/findit/crash/test/crash_testcase.py
@@ -8,6 +8,7 @@ import re
from google.appengine.api import users
from common.findit_testcase import FinditTestCase
+from libs.http import retry_http_client
from lib.gitiles.change_log import ChangeLog
from model.crash.crash_config import CrashConfig
@@ -81,6 +82,21 @@ DUMMY_CHANGELOG = ChangeLog.FromDict({
})
+class MockHttpClient(retry_http_client.RetryHttpClient): # pragma: no cover.
+
+ def __init__(self):
+ super(MockHttpClient, self).__init__()
+
+ def _Get(self, url, *_):
+ pass
+
+ def _Post(self, *_):
+ pass
+
+ def _Put(self, *_):
+ pass
+
+
class CrashTestCase(FinditTestCase): # pragma: no cover.
def setUp(self):
@@ -90,3 +106,6 @@ class CrashTestCase(FinditTestCase): # pragma: no cover.
def GetDummyChangeLog(self):
return DUMMY_CHANGELOG
+
+ def GetMockHttpClient(self):
+ return MockHttpClient()
« no previous file with comments | « appengine/findit/crash/findit.py ('k') | appengine/findit/handlers/crash/crash_handler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698