Chromium Code Reviews| 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
|