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

Unified Diff: infra/services/devicemon/test/device_metrics_test.py

Issue 1993443002: Delete devicemon; moving to sysmon. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 7 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/services/devicemon/test/__init__.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/services/devicemon/test/device_metrics_test.py
diff --git a/infra/services/devicemon/test/device_metrics_test.py b/infra/services/devicemon/test/device_metrics_test.py
deleted file mode 100644
index 0d91fc571824e065376ed202e01b7cb28bc36741..0000000000000000000000000000000000000000
--- a/infra/services/devicemon/test/device_metrics_test.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright (c) 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from infra.services.devicemon import device_metrics
-from infra_libs import ts_mon
-
-from devil.android import device_utils
-
-
-class DeviceMetricsTest(unittest.TestCase):
- def setUp(self):
- ts_mon.reset_for_unittest()
-
- def test_cpu_temp(self):
- device = device_utils.DeviceUtils('fake_serial')
- # todo: mock device interactions
- device_metrics.set_cpu_temp(device, {'device_id': 'fake_serial'})
- cpu_temp = device_metrics.cpu_temp_metric.get({'device_id': 'fake_serial'})
-
- self.assertEqual(0, cpu_temp)
-
- def test_battery_temp(self):
- device = device_utils.DeviceUtils('fake_serial')
- # todo: mock device interactions
- device_metrics.set_battery_temp(device, {})
- battery_temp = device_metrics.battery_temp_metric.get({})
-
- self.assertEqual(0, battery_temp)
-
- def test_battery_charge(self):
- device = device_utils.DeviceUtils('fake_serial')
- # todo: mock device interactions
- device_metrics.set_battery_charge(device, {})
- battery_charge = device_metrics.battery_charge_metric.get({})
-
- self.assertEqual(0, battery_charge)
-
- def test_device_status(self):
- device = device_utils.DeviceUtils('fake_serial')
- # todo: mock device interactions
- device_metrics.set_device_status(device, {}, status='on_fire')
- device_status = device_metrics.device_status_metric.get({})
-
- self.assertEqual('on_fire', device_status)
-
- # todo: more tests(!!) once the device interaction is implemented
-
-
-if __name__ == '__main__':
- unittest.main()
« no previous file with comments | « infra/services/devicemon/test/__init__.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698