Selaa lähdekoodia

HUE-8750 [core] Fix TestFileBrowserWithHadoop

Jean-Francois Desjeans Gauthier 6 vuotta sitten
vanhempi
commit
c7af756ee9
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      apps/filebrowser/src/filebrowser/views_test.py

+ 3 - 2
apps/filebrowser/src/filebrowser/views_test.py

@@ -21,6 +21,7 @@ import logging
 import os
 import re
 import tempfile
+import urllib
 import urlparse
 from avro import schema, datafile, io
 
@@ -435,7 +436,7 @@ class TestFileBrowserWithHadoop(object):
     assert_equal(stat_dir, response.context[0]['path'])
 
     response = self.c.get('/filebrowser/view=/test-filebrowser/?default_to_home')
-    assert_true(re.search('%s$' % home, response['Location']))
+    assert_true(re.search('%s$' % home, urllib.unquote(response['Location'])))
 
     # Test path relative to home directory
     self.cluster.fs.do_as_user('test', self.cluster.fs.mkdir, '%s/test_dir' % home)
@@ -771,7 +772,7 @@ class TestFileBrowserWithHadoop(object):
     response = self.c.get('/filebrowser/view=/')
     assert_equal(response.context[0]['path'], '/')
     response = self.c.get('/filebrowser/view=/?default_to_home=1')
-    assert_equal("/filebrowser/view=/user/test", response["location"])
+    assert_equal("/filebrowser/view=/user/test", urllib.unquote(response["location"]))
 
 
   def test_view_access(self):