Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/hg/test/update_issues.py

Issue 29343042: Noissue - fix brittle tests of update_issues.py (Closed)
Patch Set: Created May 25, 2016, 3:19 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/hg/test/update_issues.py
===================================================================
--- a/sitescripts/hg/test/update_issues.py
+++ b/sitescripts/hg/test/update_issues.py
@@ -58,17 +58,17 @@
multicall = mock.Mock(return_value=ret)
multicall.ticket.milestone.get = lambda i: ret.append(MILESTONES[i])
return multicall
def _mock_trac(self):
trac = mock.Mock()
trac.ticket.get = lambda i: [i, mock.ANY, mock.ANY, ISSUES[i]['attrs']]
trac.ticket.getActions = lambda i: ISSUES[i]['actions']
- trac.ticket.milestone.getAll = lambda: MILESTONES.keys()
+ trac.ticket.milestone.getAll = lambda: sorted(MILESTONES.keys())
self.trac_proxy_mock = trac
self._patchWith('xmlrpclib.ServerProxy', trac)
self._patchWith('xmlrpclib.MultiCall',
self._create_mock_milestone_multicall())
def _mock_config(self):
config = ConfigParser.ConfigParser()
config.add_section('hg')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld