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

Unified Diff: scripts/slave/unittests/runtest_test.py

Issue 2346963003: Updating perf recipe for disabled chartjson data. (Closed)
Patch Set: Created 4 years, 3 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: scripts/slave/unittests/runtest_test.py
diff --git a/scripts/slave/unittests/runtest_test.py b/scripts/slave/unittests/runtest_test.py
index 282b1d773b49b30e6f886d6cbbb5b25a80408a55..97d6a1d3ef65adeae17d2a565ea2909d31b6bb80 100755
--- a/scripts/slave/unittests/runtest_test.py
+++ b/scripts/slave/unittests/runtest_test.py
@@ -131,7 +131,8 @@ class SendResultsToDashboardTest(unittest.TestCase):
"""Tests that the right methods get called in _SendResultsToDashboard."""
# Since this method just tests that certain methods get called when
# a call to _SendResultsDashboard is made, the data used below is arbitrary.
- fake_charts_data = {'chart': {'traces': {'x': [1, 0]}, 'rev': 1000}}
+ fake_charts_data = \
+ {'chart': {'traces': {'x': [1, 0]}, 'rev': 1000}}
perezju 2016/09/22 08:50:27 why this change?
eyaich1 2016/09/26 15:22:11 Not sure. Done.
fake_points_data = [{'test': 'master/bot/chart/x', 'revision': 1000}]
fake_results_tracker = mock.Mock()
fake_results_tracker.IsChartJson = mock.MagicMock(return_value=False)
@@ -170,13 +171,14 @@ class SendResultsToDashboardTest(unittest.TestCase):
"""Tests that the right methods get called in _SendResultsToDashboard."""
# Since this method just tests that certain methods get called when
# a call to _SendResultsDashboard is made, the data used below is arbitrary.
- fake_json_data = {'chart': {'traces': {'x': [1, 0]}, 'rev': 1000}}
+ fake_json_data = \
+ {'chart': {'traces': {'x': [1, 0]}, 'rev': 1000}, 'disabled': False}
perezju 2016/09/22 08:50:27 The style guide discourages the use of backslash f
eyaich1 2016/09/26 15:22:11 Done.
fake_results_tracker = mock.Mock()
fake_results_tracker.IsChartJson = mock.MagicMock(return_value=True)
fake_results_tracker.ChartJson = mock.MagicMock(return_value=fake_json_data)
fake_results_tracker.IsReferenceBuild = mock.MagicMock(return_value=False)
fake_results_tracker.Cleanup = mock.MagicMock()
- MakeDashboardJsonV1.return_value = {'doesnt': 'matter'}
+ MakeDashboardJsonV1.return_value = (False, {'doesnt': 'matter'})
result = runtest._SendResultsToDashboard(
fake_results_tracker, {
« scripts/slave/runtest.py ('K') | « scripts/slave/unittests/results_dashboard_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698