| OLD | NEW | 
|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python | 
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be | 
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. | 
| 5 | 5 | 
| 6 """Unit tests for breakpad.py.""" | 6 """Unit tests for breakpad.py.""" | 
| 7 | 7 | 
| 8 import os | 8 import os | 
| 9 import sys | 9 import sys | 
| 10 | 10 | 
| 11 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | 11 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | 
| 12 | 12 | 
| 13 from super_mox import SuperMoxTestBase | 13 from testing_support.super_mox import SuperMoxTestBase | 
| 14 | 14 | 
| 15 import breakpad | 15 import breakpad | 
| 16 | 16 | 
| 17 | 17 | 
| 18 class Breakpad(SuperMoxTestBase): | 18 class Breakpad(SuperMoxTestBase): | 
| 19   """Setups and tear downs the mocks but doesn't test anything as-is.""" | 19   """Setups and tear downs the mocks but doesn't test anything as-is.""" | 
| 20   def setUp(self): | 20   def setUp(self): | 
| 21     super(Breakpad, self).setUp() | 21     super(Breakpad, self).setUp() | 
| 22     self.mox.StubOutWithMock(breakpad.atexit, 'register') | 22     self.mox.StubOutWithMock(breakpad.atexit, 'register') | 
| 23     self.mox.StubOutWithMock(breakpad.getpass, 'getuser') | 23     self.mox.StubOutWithMock(breakpad.getpass, 'getuser') | 
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 111   def testSendException(self): | 111   def testSendException(self): | 
| 112     obj = Exception('foo') | 112     obj = Exception('foo') | 
| 113     obj.msg = 'a message' | 113     obj.msg = 'a message' | 
| 114     self._check(obj, 'foo\nMsg: a message') | 114     self._check(obj, 'foo\nMsg: a message') | 
| 115 | 115 | 
| 116 | 116 | 
| 117 | 117 | 
| 118 if __name__ == '__main__': | 118 if __name__ == '__main__': | 
| 119   import unittest | 119   import unittest | 
| 120   unittest.main() | 120   unittest.main() | 
| OLD | NEW | 
|---|