Index: verification/fake.py |
diff --git a/verification/fake.py b/verification/fake.py |
index c38009e3de161acaedcf9f1ba07ec2e12016d73b..9b95854c46c876d7a1d84e851eb3819de87a9c92 100644 |
--- a/verification/fake.py |
+++ b/verification/fake.py |
@@ -6,6 +6,8 @@ |
from verification import base |
+def failed_message(): |
+ return 'FakeVerifier FAILED' |
class FakeVerifier(base.Verifier): |
name = 'fake' |
@@ -15,7 +17,11 @@ class FakeVerifier(base.Verifier): |
self.state = state |
def verify(self, pending): |
- pending.verifications[self.name] = base.SimpleStatus(self.state) |
+ fake = base.SimpleStatus(self.state) |
+ # Make sure to leave a message, so CQ tests can reliably test for it. |
+ if self.state == base.FAILED: |
+ fake.error_message = failed_message() |
+ pending.verifications[self.name] = fake |
def update_status(self, queue): |
pass |
@@ -39,3 +45,6 @@ class DeferredFakeVerifier(base.Verifier): |
for _, fake in self.loop(queue, base.SimpleStatus, True): |
fake.state = self.state |
+ # Make sure to leave a message, so CQ tests can reliably test for it. |
+ if self.state == base.FAILED: |
+ fake.error_message = failed_message() |