Fix git cl checkout when no branch has issues.

TBR=machenbach@chromium.org
BUG=579182

Review URL: https://codereview.chromium.org/1878613003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299843 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index e94e912..a9c1072 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -1180,6 +1180,19 @@
     self.calls = self._checkout_calls()
     self.assertEqual(1, git_cl.main(['checkout', '99999']))
 
+  def test_checkout_no_branch_issues(self):
+    """Tests git cl checkout <issue>."""
+    self.calls = [
+        ((['git', 'config', '--local', '--get-regexp',
+           'branch\\..*\\.rietveldissue'], ), '',
+         subprocess2.CalledProcessError(1, '', '', '', '')),
+        ((['git', 'config', '--local', '--get-regexp',
+           'branch\\..*\\.gerritissue'], ), '',
+         subprocess2.CalledProcessError(1, '', '', '', '')),
+
+    ]
+    self.assertEqual(1, git_cl.main(['checkout', '99999']))
+
 
 if __name__ == '__main__':
   git_cl.logging.basicConfig(