| OLD | NEW |
| 1 #!/usr/bin/env python | |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # 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 |
| 4 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 5 | 4 |
| 6 """Unit Tests for bug hunter.""" | 5 """Unit Tests for bug hunter.""" |
| 7 | 6 |
| 8 import logging | 7 import logging |
| 9 from optparse import Values | 8 from optparse import Values |
| 10 import smtplib | 9 import smtplib |
| 11 import sys | 10 import sys |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 173 |
| 175 def testStripHTMLEmpty(self): | 174 def testStripHTMLEmpty(self): |
| 176 self.assertEquals(BugHunterUtils.StripHTML(''), '') | 175 self.assertEquals(BugHunterUtils.StripHTML(''), '') |
| 177 | 176 |
| 178 def testSendEmail(self): | 177 def testSendEmail(self): |
| 179 smtplib.SMTP = MockSmtp | 178 smtplib.SMTP = MockSmtp |
| 180 self.assertEqual(BugHunterUtils.SendEmail('message', 'sender_email_address', | 179 self.assertEqual(BugHunterUtils.SendEmail('message', 'sender_email_address', |
| 181 'receivers_email_addresses', | 180 'receivers_email_addresses', |
| 182 'subject'), | 181 'subject'), |
| 183 True) | 182 True) |
| OLD | NEW |