summaryrefslogtreecommitdiff
path: root/morphlib/remoterepocache_tests.py
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2013-12-17 15:59:41 +0000
committerBen Brown <ben.brown@codethink.co.uk>2013-12-18 12:02:18 +0000
commit08281eece1dc4a814dff6bb44509dfd026e7241c (patch)
tree8f8b74763b2e86866994ddf09c4b58d5e92e82af /morphlib/remoterepocache_tests.py
parent8ba03d5ce830968cd38f445bb942af72871448b6 (diff)
downloadmorph-08281eece1dc4a814dff6bb44509dfd026e7241c.tar.gz
Quote ref and filename
Previous fix only quoted URLs, which fixed petrify --no-git-update, but not the whole problem, quoting ref and filename prevents other problems that may be caused by non URL friendly characters.
Diffstat (limited to 'morphlib/remoterepocache_tests.py')
-rw-r--r--morphlib/remoterepocache_tests.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/morphlib/remoterepocache_tests.py b/morphlib/remoterepocache_tests.py
index 22c89bf9..0b1a183b 100644
--- a/morphlib/remoterepocache_tests.py
+++ b/morphlib/remoterepocache_tests.py
@@ -17,23 +17,22 @@
import json
import unittest
-import urllib
import morphlib
class RemoteRepoCacheTests(unittest.TestCase):
def _resolve_ref_for_repo_url(self, repo_url, ref):
- return self.sha1s[urllib.unquote(repo_url)][ref]
+ return self.sha1s[repo_url][ref]
def _cat_file_for_repo_url(self, repo_url, sha1, filename):
- return self.files[urllib.unquote(repo_url)][sha1][filename]
+ return self.files[repo_url][sha1][filename]
def _ls_tree_for_repo_url(self, repo_url, sha1):
return json.dumps({
'repo': repo_url,
'ref': sha1,
- 'tree': self.files[urllib.unquote(repo_url)][sha1]
+ 'tree': self.files[repo_url][sha1]
})
def setUp(self):