[Telepathy-commits] [telepathy-salut/master] test-send-file-wait-to-provide.py: unescape the url filename

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Mon Nov 10 09:43:29 PST 2008


---
 .../avahi/test-send-file-wait-to-provide.py        |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/twisted/avahi/test-send-file-wait-to-provide.py b/tests/twisted/avahi/test-send-file-wait-to-provide.py
index 1e8afb1..2c7b521 100644
--- a/tests/twisted/avahi/test-send-file-wait-to-provide.py
+++ b/tests/twisted/avahi/test-send-file-wait-to-provide.py
@@ -3,6 +3,7 @@ import urlparse
 import dbus
 import socket
 import md5
+import urllib
 
 from saluttest import exec_test
 from avahitest import AvahiAnnouncer
@@ -159,7 +160,8 @@ def test(q, bus, conn):
     assert url_node['size'] == str(FILE_SIZE)
     assert url_node['mimeType'] == FILE_CONTENT_TYPE
     url = url_node.children[0]
-    assert url.endswith(FILE_NAME)
+    _, host, file, _, _, _ = urlparse.urlparse(url)
+    urllib.unquote(file) == FILE_NAME
     desc_node = xpath.queryForNodes("/iq/query/desc",  iq)[0]
     desc = desc_node.children[0]
     assert desc == FILE_DESCRIPTION
@@ -169,7 +171,6 @@ def test(q, bus, conn):
     assert state == FT_STATE_PENDING
 
     # Connect HTTP client to the CM and request the file
-    _, host, file, _, _, _ = urlparse.urlparse(url)
     http = httplib.HTTPConnection(host)
     http.request('GET', file)
 
-- 
1.5.6.5




More information about the Telepathy-commits mailing list