From 8cb6affc2036c43d53d6c4f9352300840a54c7ba Mon Sep 17 00:00:00 2001 From: Ryan McElroy Date: Wed, 7 Feb 2018 01:53:48 -0800 Subject: [PATCH] phabstatus: add two more tests showing unhandled errors Summary: These cause tracebacks; grepped out for readability. Reviewed By: DurhamG Differential Revision: D6826450 fbshipit-source-id: 4ea27f0f30cd9ab97710a234f5a451912ccc55c1 --- tests/test-fb-hgext-phabstatus.t | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test-fb-hgext-phabstatus.t b/tests/test-fb-hgext-phabstatus.t index a2cd32d26e..4baee35aab 100644 --- a/tests/test-fb-hgext-phabstatus.t +++ b/tests/test-fb-hgext-phabstatus.t @@ -39,6 +39,20 @@ And now with bad responses: Error info: failed, yo Error + $ cat > $TESTTMP/mockduit << EOF + > [{"data": {"query": [{"results": {"nodes": null}}]}}] + > EOF + $ HG_ARC_CONDUIT_MOCK=$TESTTMP/mockduit hg log -T '{phabstatus}\n' -r . 2>&1 | grep Error + AttributeError: 'NoneType' object has no attribute 'get' + + $ cat > $TESTTMP/mockduit << EOF + > [{"data": {"query": [{"results": null}]}}] + > EOF + $ HG_ARC_CONDUIT_MOCK=$TESTTMP/mockduit hg log -T '{phabstatus}\n' -r . 2>&1 | grep Error + Error talking to phabricator. No diff information can be provided. + Error info: 'NoneType' object has no attribute '__getitem__' + Error + Missing status field is treated as an error $ cat > $TESTTMP/mockduit << EOF > [{"data": {"query": [{"results": {"nodes": [