Commit 1c67da67 authored by tandrii's avatar tandrii Committed by Commit bot

Mock stdout to avoid pollutting test runner stdout.

TBR=kmarshall@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2055003003
parent ea46b886
......@@ -1507,6 +1507,8 @@ class TestGitCl(TestCase):
self.assertEqual('hi\n\t there\n\nman', ChangelistMock.desc)
def test_archive(self):
self.mock(git_cl.sys, 'stdout', StringIO.StringIO())
self.calls = \
[((['git', 'for-each-ref', '--format=%(refname)', 'refs/heads'],),
'refs/heads/master\nrefs/heads/foo\nrefs/heads/bar'),
......@@ -1541,6 +1543,7 @@ class TestGitCl(TestCase):
self.assertEqual(0, git_cl.main(['archive', '-f']))
def test_archive_current_branch_fails(self):
self.mock(git_cl.sys, 'stdout', StringIO.StringIO())
self.calls = \
[((['git', 'for-each-ref', '--format=%(refname)', 'refs/heads'],),
'refs/heads/master'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment