The list of contributors in committers.py should be a separate JSON
[WebKit-https.git] / Tools / Scripts / webkitpy / common / config / committervalidator_unittest.py
index 58fd3a5..e8aa887 100644 (file)
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-import unittest
+import unittest2 as unittest
 
+from webkitpy.common.host_mock import MockHost
 from .committervalidator import CommitterValidator
 
 
 class CommitterValidatorTest(unittest.TestCase):
     def test_flag_permission_rejection_message(self):
-        validator = CommitterValidator(bugzilla=None)
+        validator = CommitterValidator(MockHost())
         self.assertEqual(validator._committers_py_path(), "Tools/Scripts/webkitpy/common/config/committers.py")
         expected_messsage = """foo@foo.com does not have review permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.
 
 - If you do not have review rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.
 
 - If you have review rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed).  The commit-queue restarts itself every 2 hours.  After restart the commit-queue will correctly respect your review rights."""
-        self.assertEqual(validator._flag_permission_rejection_message("foo@foo.com", "review"), expected_messsage)
+        self.assertMultiLineEqual(validator._flag_permission_rejection_message("foo@foo.com", "review"), expected_messsage)