| Index: appengine/findit/common/test/repo_util_test.py
|
| diff --git a/appengine/findit/common/test/repo_util_test.py b/appengine/findit/common/test/repo_util_test.py
|
| index 696c6a34eed7047e790d920400f7e13d6ce563bf..790f85686f0b75c8aee90131b57982cca9baa186 100644
|
| --- a/appengine/findit/common/test/repo_util_test.py
|
| +++ b/appengine/findit/common/test/repo_util_test.py
|
| @@ -4,6 +4,7 @@
|
|
|
| import json
|
| import StringIO
|
| +import subprocess
|
| from testing_utils import testing
|
| import textwrap
|
| import urllib2
|
| @@ -133,3 +134,18 @@ class RepoUtilTest(testing.AppengineTestCase):
|
|
|
| reverted_revision = repo_util.GetRevertedRevision(message)
|
| self.assertIsNone(reverted_revision)
|
| +
|
| + def testGetLocalGitCommandOutput(self):
|
| + class _MockProcess(object):
|
| + def __init__(self, command, *_):
|
| + self.command = command
|
| +
|
| + def communicate(self, *_):
|
| + return self.command, 'dummy'
|
| +
|
| + def _MockPopen(command, **_):
|
| + return _MockProcess(command)
|
| +
|
| + self.mock(subprocess, 'Popen', _MockPopen)
|
| + output = repo_util.GetCommandOutput('command')
|
| + self.assertEqual(output, 'command')
|
|
|