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) 2012 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 bug hunter.""" | 6 """Unit Tests for bug hunter.""" |
7 | 7 |
8 import logging | 8 import logging |
9 from optparse import Values | 9 from optparse import Values |
10 import smtplib | 10 import smtplib |
11 import sys | 11 import sys |
12 import unittest | 12 import unittest |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 def testStripHTMLEmpty(self): | 175 def testStripHTMLEmpty(self): |
176 self.assertEquals(BugHunterUtils.StripHTML(''), '') | 176 self.assertEquals(BugHunterUtils.StripHTML(''), '') |
177 | 177 |
178 def testSendEmail(self): | 178 def testSendEmail(self): |
179 smtplib.SMTP = MockSmtp | 179 smtplib.SMTP = MockSmtp |
180 self.assertEqual(BugHunterUtils.SendEmail('message', 'sender_email_address', | 180 self.assertEqual(BugHunterUtils.SendEmail('message', 'sender_email_address', |
181 'receivers_email_addresses', | 181 'receivers_email_addresses', |
182 'subject'), | 182 'subject'), |
183 True) | 183 True) |
OLD | NEW |