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

Unified Diff: Tools/TestResultServer/model/jsonresults_unittest.py

Issue 475503005: Handle tries of results data in upload (fix _is_directory). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add a test, fix unrelated failing unittest Created 6 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
Index: Tools/TestResultServer/model/jsonresults_unittest.py
diff --git a/Tools/TestResultServer/model/jsonresults_unittest.py b/Tools/TestResultServer/model/jsonresults_unittest.py
index 38d170c391e724332c17d2388e2929d3f8334427..5ebf394e97a9d774e0545493ebd717e03d0c0a00 100755
--- a/Tools/TestResultServer/model/jsonresults_unittest.py
+++ b/Tools/TestResultServer/model/jsonresults_unittest.py
@@ -1162,5 +1162,14 @@ class JsonResultsTest(unittest.TestCase):
tb.deactivate()
+ def test_normalize_results_with_top_level_results_key_does_not_crash(self):
+ aggregated_json = {
+ 'Linux Tests': {
+ 'results': {'foo': {'results': [(1, 'P')],
+ 'times': [(1, 1)]}},
+ }
+ }
+ JsonResults._normalize_results(aggregated_json, 1, 2)
+
if __name__ == '__main__':
unittest.main()

Powered by Google App Engine
This is Rietveld 408576698