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

Unified Diff: appengine/findit/waterfall/test/monitor_try_job_pipeline_test.py

Issue 2260313003: [Findit] Capture and store latest buildbucket response with each query (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Addressing comments Created 4 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
« no previous file with comments | « appengine/findit/waterfall/monitor_try_job_pipeline.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/waterfall/test/monitor_try_job_pipeline_test.py
diff --git a/appengine/findit/waterfall/test/monitor_try_job_pipeline_test.py b/appengine/findit/waterfall/test/monitor_try_job_pipeline_test.py
index ddca402d90ea2d9a3e0961223c26aa61b4a99f07..e9711cc4af3fd7eb777d0e176d20cb0812ecd62d 100644
--- a/appengine/findit/waterfall/test/monitor_try_job_pipeline_test.py
+++ b/appengine/findit/waterfall/test/monitor_try_job_pipeline_test.py
@@ -133,6 +133,32 @@ class MonitorTryJobPipelineTest(wf_testcase.WaterfallTestCase):
monitor_try_job_pipeline._MicrosecondsToDatetime(1454367574000000))
self.assertIsNone(monitor_try_job_pipeline._MicrosecondsToDatetime(None))
+ def testDictsAreEqual(self):
+ self.assertTrue(monitor_try_job_pipeline._DictsAreEqual(None, None))
+ self.assertTrue(monitor_try_job_pipeline._DictsAreEqual({}, {}))
+ self.assertTrue(monitor_try_job_pipeline._DictsAreEqual({'a': 1}, {'a': 1}))
+ self.assertTrue(monitor_try_job_pipeline._DictsAreEqual(
+ {'a': 1},
+ {'a': 1, 'b': 2},
+ exclude_keys=['b']))
+ self.assertTrue(monitor_try_job_pipeline._DictsAreEqual(
+ {'a': 1, 'b': 1},
+ {'a': 1, 'b': 2},
+ exclude_keys=['b']))
+ self.assertTrue(monitor_try_job_pipeline._DictsAreEqual(
+ {'a': 1},
+ {},
+ exclude_keys=['a']))
+ self.assertFalse(monitor_try_job_pipeline._DictsAreEqual(
+ {'a': 1},
+ {'a': 2}))
+ self.assertFalse(monitor_try_job_pipeline._DictsAreEqual(
+ {'a': 1, 'b': 2},
+ {'a': 1}))
+ self.assertFalse(monitor_try_job_pipeline._DictsAreEqual(
+ {'a': 1},
+ {'a': 1, 'b': 2}))
+
def testUpdateTryJobMetadataForBuildError(self):
error_data = {
'reason': 'BUILD_NOT_FOUND',
« no previous file with comments | « appengine/findit/waterfall/monitor_try_job_pipeline.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698