Index: commit-queue/verification/fake.py |
=================================================================== |
--- commit-queue/verification/fake.py (revision 249146) |
+++ commit-queue/verification/fake.py (working copy) |
@@ -1,41 +0,0 @@ |
-# coding=utf8 |
-# 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. |
-"""A verifier that does nothing.""" |
- |
-from verification import base |
- |
- |
-class FakeVerifier(base.Verifier): |
- name = 'fake' |
- |
- def __init__(self, state): |
- super(FakeVerifier, self).__init__() |
- self.state = state |
- |
- def verify(self, pending): |
- pending.verifications[self.name] = base.SimpleStatus(self.state) |
- |
- def update_status(self, queue): |
- pass |
- |
- |
-class DeferredFakeVerifier(base.Verifier): |
- name = 'fake' |
- |
- def __init__(self, state, delay): |
- super(DeferredFakeVerifier, self).__init__() |
- self.state = state |
- self.delay = delay |
- |
- def verify(self, pending): |
- pending.verifications[self.name] = base.SimpleStatus() |
- |
- def update_status(self, queue): |
- if self.delay: |
- self.delay -= 1 |
- return |
- |
- for _, fake in self.loop(queue, base.SimpleStatus, True): |
- fake.state = self.state |