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

Unified Diff: prebuilt_unittest.py

Issue 5542002: Switch from gsdview.appspot.com to commondatastorage.googleapis.com. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: 80 chars Created 10 years 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
« prebuilt.py ('K') | « prebuilt.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: prebuilt_unittest.py
diff --git a/prebuilt_unittest.py b/prebuilt_unittest.py
index 4c7255e3c5c3ab21d4794c1f5b93e61340a5211e..a39aabcef6e4e0077c695b223c108001ffc37d63 100755
--- a/prebuilt_unittest.py
+++ b/prebuilt_unittest.py
@@ -10,11 +10,13 @@ import prebuilt
import shutil
import tempfile
import unittest
+import urllib
from chromite.lib import cros_build_lib
from chromite.lib.binpkg import PackageIndex
-PUBLIC_PACKAGES = [{'CPV': 'public1', 'SHA1': '1'},
- {'CPV': 'public2', 'SHA1': '2', 'PATH': 'foo.tgz'}]
+PUBLIC_PACKAGES = [{'CPV': 'gtk+/public1', 'SHA1': '1'},
+ {'CPV': 'gtk+/public2', 'SHA1': '2',
+ 'PATH': 'gtk%2B/foo.tgz'}]
PRIVATE_PACKAGES = [{'CPV': 'private', 'SHA1': '3'}]
@@ -217,8 +219,8 @@ class TestPopulateDuplicateDB(unittest.TestCase):
db = {}
pkgindex._PopulateDuplicateDB(db)
self.assertEqual(len(db), 3)
- self.assertEqual(db['1'], 'http://www.example.com/public1.tbz2')
- self.assertEqual(db['2'], 'http://www.example.com/foo.tgz')
+ self.assertEqual(db['1'], 'http://www.example.com/gtk%2B/public1.tbz2')
+ self.assertEqual(db['2'], 'http://www.example.com/gtk%2B/foo.tgz')
self.assertEqual(db['3'], 'http://www.example.com/private.tbz2')
def testMissingSHA1(self):
@@ -227,7 +229,7 @@ class TestPopulateDuplicateDB(unittest.TestCase):
del pkgindex.packages[0]['SHA1']
pkgindex._PopulateDuplicateDB(db)
self.assertEqual(len(db), 2)
- self.assertEqual(db['2'], 'http://www.example.com/foo.tgz')
+ self.assertEqual(db['2'], 'http://www.example.com/gtk%2B/foo.tgz')
self.assertEqual(db['3'], 'http://www.example.com/private.tbz2')
def testFailedPopulate(self):
@@ -263,7 +265,7 @@ class TestResolveDuplicateUploads(unittest.TestCase):
dup_pkgindex = SimplePackageIndex()
expected_pkgindex = SimplePackageIndex()
for pkg in expected_pkgindex.packages:
- pkg.setdefault('PATH', pkg['CPV'] + '.tbz2')
+ pkg.setdefault('PATH', urllib.quote(pkg['CPV'] + '.tbz2'))
uploads = pkgindex.ResolveDuplicateUploads([dup_pkgindex])
self.assertEqual(pkgindex.packages, expected_pkgindex.packages)
« prebuilt.py ('K') | « prebuilt.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698