Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: commit-queue/tests/authors_white_list_test.py

Issue 135363007: Delete public commit queue to avoid confusion after move to internal repo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « commit-queue/subversion_config/config ('k') | commit-queue/tests/buildbot_json_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: commit-queue/tests/authors_white_list_test.py
===================================================================
--- commit-queue/tests/authors_white_list_test.py (revision 249146)
+++ commit-queue/tests/authors_white_list_test.py (working copy)
@@ -1,50 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Unit tests for verification/authors_white_list.py."""
-
-import os
-import sys
-import unittest
-
-ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
-sys.path.insert(0, os.path.join(ROOT_DIR, '..'))
-
-from verification import base
-from verification import authors_white_list
-
-# From tests/
-import mocks
-
-
-class AuthorTest(mocks.TestCase):
- def test_rejected(self):
- self.pending.owner = 'georges@micro.com'
- self._check(
- 'Can\'t commit because the owner %s not in whitelist' %
- self.pending.owner)
-
- def test_allowed(self):
- self.pending.owner = 'georges@example.com'
- self._check(None)
-
- def _check(self, error_message):
- ver = authors_white_list.AuthorVerifier([r'^[\-\w]+\@example\.com$'])
- ver.verify(self.pending)
- ver.update_status([self.pending])
- name = authors_white_list.AuthorVerifier.name
- self.assertEqual(self.pending.verifications.keys(), [name])
- self.assertEqual(
- self.pending.verifications[name].error_message, error_message)
- if error_message:
- self.assertEqual(
- self.pending.verifications[name].get_state(), base.FAILED)
- else:
- self.assertEqual(
- self.pending.verifications[name].get_state(), base.SUCCEEDED)
-
-
-if __name__ == '__main__':
- unittest.main()
« no previous file with comments | « commit-queue/subversion_config/config ('k') | commit-queue/tests/buildbot_json_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698