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 |
agable
2015/08/10 22:23:58
All of the *_test files which test things inside t
| |
5 import unittest | 5 import unittest |
6 | 6 |
7 from infra_libs.ts_mon import errors | 7 from infra_libs.ts_mon.gae import errors |
8 | 8 |
9 | 9 |
10 class ErrorsTest(unittest.TestCase): | 10 class ErrorsTest(unittest.TestCase): |
11 | 11 |
12 def test_decreasing_value(self): | 12 def test_decreasing_value(self): |
13 with self.assertRaises(errors.MonitoringDecreasingValueError) as e: | 13 with self.assertRaises(errors.MonitoringDecreasingValueError) as e: |
14 raise errors.MonitoringDecreasingValueError('test', 1, 0) | 14 raise errors.MonitoringDecreasingValueError('test', 1, 0) |
15 str(e.exception) | 15 str(e.exception) |
16 | 16 |
17 def test_duplicate_registration(self): | 17 def test_duplicate_registration(self): |
(...skipping 28 matching lines...) Expand all Loading... | |
46 | 46 |
47 def test_no_configured_monitor_flush(self): | 47 def test_no_configured_monitor_flush(self): |
48 with self.assertRaises(errors.MonitoringNoConfiguredMonitorError) as e: | 48 with self.assertRaises(errors.MonitoringNoConfiguredMonitorError) as e: |
49 raise errors.MonitoringNoConfiguredMonitorError(None) | 49 raise errors.MonitoringNoConfiguredMonitorError(None) |
50 str(e.exception) | 50 str(e.exception) |
51 | 51 |
52 def test_no_configured_target(self): | 52 def test_no_configured_target(self): |
53 with self.assertRaises(errors.MonitoringNoConfiguredTargetError) as e: | 53 with self.assertRaises(errors.MonitoringNoConfiguredTargetError) as e: |
54 raise errors.MonitoringNoConfiguredTargetError('test') | 54 raise errors.MonitoringNoConfiguredTargetError('test') |
55 str(e.exception) | 55 str(e.exception) |
OLD | NEW |