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

Unified Diff: infra_libs/ts_mon/common/test/metric_store_test.py

Issue 2109393002: Make test_net_info a bit more robust. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Add tests Created 4 years, 6 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 | « infra_libs/ts_mon/common/metrics.py ('k') | infra_libs/ts_mon/common/test/metrics_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra_libs/ts_mon/common/test/metric_store_test.py
diff --git a/infra_libs/ts_mon/common/test/metric_store_test.py b/infra_libs/ts_mon/common/test/metric_store_test.py
index 13ca3bfc929f8108b7f665455dd44ab9d691d819..3fbc82489ad9f00c058649e113dcfa5fde7c41ff 100644
--- a/infra_libs/ts_mon/common/test/metric_store_test.py
+++ b/infra_libs/ts_mon/common/test/metric_store_test.py
@@ -127,6 +127,22 @@ class MetricStoreTestBase(object):
self.assertIsNone(self.store.get('bar', (), None))
+ def test_iter_field_values(self):
+ fields1 = (('field', 'value'),)
+ fields2 = (('field', 'value2'),)
+ target_fields1 = {'region': 'rrr'}
+
+ self.store.set('foo', fields1, None, 42)
+ self.store.set('foo', fields2, None, 43)
+ self.store.set('foo', fields2, target_fields1, 44)
+
+ field_values = list(self.store.iter_field_values('foo'))
+ self.assertEquals([
+ ((('field', 'value'),), 42),
+ ((('field', 'value2'),), 43),
+ ((('field', 'value2'),), 44),
+ ], sorted(field_values))
+
def test_set_enforce_ge(self):
self.store.set('foo', (('field', 'value'),), None, 42, enforce_ge=True)
self.store.set('foo', (('field', 'value'),), None, 43, enforce_ge=True)
« no previous file with comments | « infra_libs/ts_mon/common/metrics.py ('k') | infra_libs/ts_mon/common/test/metrics_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698