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

Unified Diff: tools/telemetry/telemetry/value/string_unittest.py

Issue 381723002: Refactor Telemetry value system to support AsDict() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Nat's Comments Created 6 years, 5 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 | « tools/telemetry/telemetry/value/string.py ('k') | tools/telemetry/telemetry/value/value_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/value/string_unittest.py
diff --git a/tools/telemetry/telemetry/value/string_unittest.py b/tools/telemetry/telemetry/value/string_unittest.py
index cc0e2141a3a04f5f87f0bb8f6df8e4f297e1c290..5728b4f8b03ff79643b4f4bcb5ee7f3b3312e35a 100644
--- a/tools/telemetry/telemetry/value/string_unittest.py
+++ b/tools/telemetry/telemetry/value/string_unittest.py
@@ -59,3 +59,11 @@ class StringValueTest(TestBase):
self.assertEquals('label', vM.units)
self.assertEquals(True, vM.important)
self.assertEquals(['L1', 'L2'], vM.values)
+
+ def testAsDictIsAccurate(self):
+ v = string.StringValue(None, 'x', 'unit', 'foo', important=False)
+ d = v.AsDictWithoutBaseClassEntries()
+
+ self.assertEquals(d, {
+ 'value': 'foo'
+ })
« no previous file with comments | « tools/telemetry/telemetry/value/string.py ('k') | tools/telemetry/telemetry/value/value_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698