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

Unified Diff: tools/auto_bisect/crbug_query_test_data.py

Issue 697713003: Aborting bisect early when the bug specified in the bisect config is closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: tools/auto_bisect/crbug_query_test_data.py
diff --git a/tools/auto_bisect/crbug_query_test_data.py b/tools/auto_bisect/crbug_query_test_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..e59d34ca2db9374bc913fd0f1b9d525695e5844f
--- /dev/null
+++ b/tools/auto_bisect/crbug_query_test_data.py
@@ -0,0 +1,20 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# These strings are simulated responses to various conditions when querying
+# the chromium issue tracker.
+import os
+
+_current_directory = os.path.dirname(__file__)
+_test_data_directory = os.path.join(_current_directory, 'test_data')
+
+CLOSED_ISSUE_DATA = open(os.path.join(_test_data_directory,
+ 'closed.json')).read()
+
+OPEN_ISSUE_DATA = open(os.path.join(_test_data_directory,
+ 'open.json')).read()
+
+UNEXPECTED_FORMAT_DATA = CLOSED_ISSUE_DATA.replace('issues$state', 'gibberish')
+
+BROKEN_ISSUE_DATA = "\n<HTML><HEAD><TITLE>Not a JSON Doc</TITLE></HEAD></HTML>"
qyearsley 2014/11/01 16:56:57 This could also go directly in crbug_query_test.py
RobertoCN 2014/11/02 07:48:35 Originally it contained the full text of the json

Powered by Google App Engine
This is Rietveld 408576698