| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import unittest | 5 import unittest |
| 6 | 6 |
| 7 from infra_libs.ts_mon import standard_metrics | 7 try: |
| 8 | 8 from infra_libs.ts_mon.common import standard_metrics |
| 9 except ImportError: |
| 10 from common import standard_metrics |
| 9 | 11 |
| 10 class StandardMetricsTest(unittest.TestCase): | 12 class StandardMetricsTest(unittest.TestCase): |
| 11 | 13 |
| 12 def setUp(self): | 14 def setUp(self): |
| 13 standard_metrics.up.reset() | 15 standard_metrics.up.reset() |
| 14 | 16 |
| 15 def test_up(self): | 17 def test_up(self): |
| 16 standard_metrics.init() | 18 standard_metrics.init() |
| 17 self.assertTrue(standard_metrics.up.get()) | 19 self.assertTrue(standard_metrics.up.get()) |
| OLD | NEW |