|
|
|
@ -1493,14 +1493,8 @@ class TestGitCl(TestCase):
|
|
|
|
|
def test_description_rietveld(self):
|
|
|
|
|
out = StringIO.StringIO()
|
|
|
|
|
self.mock(git_cl.sys, 'stdout', out)
|
|
|
|
|
self.mock(git_cl.Changelist, 'GetDescription',
|
|
|
|
|
lambda *args: 'foobar')
|
|
|
|
|
self.mock(git_cl.Changelist, 'GetDescription', lambda *args: 'foobar')
|
|
|
|
|
|
|
|
|
|
self.calls = [
|
|
|
|
|
((['git', 'config', 'rietveld.autoupdate'],), ''),
|
|
|
|
|
((['git', 'config', 'rietveld.server'],), ''),
|
|
|
|
|
((['git', 'config', 'rietveld.server'],), ''),
|
|
|
|
|
]
|
|
|
|
|
self.assertEqual(0, git_cl.main([
|
|
|
|
|
'description', 'https://code.review.org/123123', '-d', '--rietveld']))
|
|
|
|
|
self.assertEqual('foobar\n', out.getvalue())
|
|
|
|
@ -1508,8 +1502,7 @@ class TestGitCl(TestCase):
|
|
|
|
|
def test_description_gerrit(self):
|
|
|
|
|
out = StringIO.StringIO()
|
|
|
|
|
self.mock(git_cl.sys, 'stdout', out)
|
|
|
|
|
self.mock(git_cl.Changelist, 'GetDescription',
|
|
|
|
|
lambda *args: 'foobar')
|
|
|
|
|
self.mock(git_cl.Changelist, 'GetDescription', lambda *args: 'foobar')
|
|
|
|
|
|
|
|
|
|
self.assertEqual(0, git_cl.main([
|
|
|
|
|
'description', 'https://code.review.org/123123', '-d', '--gerrit']))
|
|
|
|
|