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

Unified Diff: third_party/cq_client/test/validate_config_test.py

Issue 1475033006: Updated cq_client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Restore manual protobuf26 fixes Created 5 years, 1 month 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
Index: third_party/cq_client/test/validate_config_test.py
diff --git a/third_party/cq_client/test/validate_config_test.py b/third_party/cq_client/test/validate_config_test.py
index d7c09714a05be2bbe4035d418107b2be6de56118..3e5121afcc9f817e156d3d7d177dcfd3681d0c91 100755
--- a/third_party/cq_client/test/validate_config_test.py
+++ b/third_party/cq_client/test/validate_config_test.py
@@ -16,10 +16,24 @@ TEST_DIR = os.path.dirname(os.path.abspath(__file__))
class TestValidateConfig(unittest.TestCase):
- def test_is_valid(self):
- with open(os.path.join(TEST_DIR, 'cq_example.cfg'), 'r') as test_config:
+ def test_is_valid_rietveld(self):
+ with open(os.path.join(TEST_DIR, 'cq_rietveld.cfg'), 'r') as test_config:
self.assertTrue(validate_config.IsValid(test_config.read()))
+ def test_is_valid_gerrit(self):
+ with open(os.path.join(TEST_DIR, 'cq_gerrit.cfg'), 'r') as test_config:
+ self.assertTrue(validate_config.IsValid(test_config.read()))
+
+ def test_one_codereview(self):
+ with open(os.path.join(TEST_DIR, 'cq_gerrit.cfg'), 'r') as gerrit_config:
+ data = gerrit_config.read()
+ data += '\n'.join([
+ 'rietveld{',
+ 'url: "https://blabla.com"',
+ '}'
+ ])
+ self.assertFalse(validate_config.IsValid(data))
+
def test_has_field(self):
config = cq_pb2.Config()

Powered by Google App Engine
This is Rietveld 408576698