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

Unified Diff: tests/rietveld_test.py

Issue 10272024: There is no reason to not assume that status:null isn't 'M'. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 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
« no previous file with comments | « 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 70bb320bd7c180ad117ab43a6d3fcccbc2f3c54f..582361b7bdd9228683ae36f023ffb43c26a90512 100755
--- a/tests/rietveld_test.py
+++ b/tests/rietveld_test.py
@@ -88,12 +88,23 @@ class RietveldTest(unittest.TestCase):
self.assertEquals(p.svn_properties, svn_properties)
def test_get_patch_no_status(self):
- self.requests = [('/api/123/456', _api({'file_a': {}}))]
- try:
- self.rietveld.get_patch(123, 456)
- self.fail()
- except patch.UnsupportedPatchFormat, e:
- self.assertEquals('file_a', e.filename)
+ self.requests = [
+ ( '/api/123/456',
+ _api(
+ {
+ 'tools/clang_check/README.chromium': {
+ 'status': None,
+ 'id': 789,
+ }})),
+ ('/download/issue123_456_789.diff', RAW.DELETE),
+ ]
+ patches = self.rietveld.get_patch(123, 456)
+ self.assertEquals(1, len(patches.patches))
+ self._check_patch(
+ patches.patches[0],
+ 'tools/clang_check/README.chromium',
+ RAW.DELETE,
+ is_delete=True)
def test_get_patch_2_files(self):
self.requests = [
« no previous file with comments | « rietveld.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698