Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Unified Diff: tests/rietveld_test.py

Issue 14061008: Have Rietveld.get_description() consistently strip CR and whitespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« rietveld.py ('K') | « rietveld.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/rietveld_test.py
diff --git a/tests/rietveld_test.py b/tests/rietveld_test.py
index 9171c72145dee704beebf3ffaf19fea4cb957a91..17627a5fd1b2a69903e809612d5e0d8e80d6862b 100755
--- a/tests/rietveld_test.py
+++ b/tests/rietveld_test.py
@@ -403,11 +403,12 @@ class CachingRietveldTest(BaseFixture):
self.assertEqual(expected, self.rietveld.get_description(1))
def test_get_issue_properties(self):
+ data = {'description': 'wow\r\nno CR!', 'messages': 'foo'}
self.requests = [
- ('/api/1?messages=true', rietveld.json.dumps({'messages': 'foo'})),
+ ('/api/1?messages=true', rietveld.json.dumps(data)),
]
- expected = {}
- expected_msg = {'messages': 'foo'}
+ expected = {u'description': u'wow\nno CR!'}
+ expected_msg = {u'description': u'wow\nno CR!', u'messages': u'foo'}
self.assertEqual(expected, self.rietveld.get_issue_properties(1, False))
self.assertEqual(expected_msg, self.rietveld.get_issue_properties(1, True))
« rietveld.py ('K') | « rietveld.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698