##// END OF EJS Templates
Merge pull request #4927 from minrk/no-files-prefix...
Thomas Kluyver -
r14924:a1a56f8e merge
parent child Browse files
Show More
@@ -267,7 +267,7 b' class FileLink(object):'
267 267
268 268 def __init__(self,
269 269 path,
270 url_prefix='files/',
270 url_prefix='',
271 271 result_html_prefix='',
272 272 result_html_suffix='<br>'):
273 273 """
@@ -328,7 +328,7 b' class FileLinks(FileLink):'
328 328 """
329 329 def __init__(self,
330 330 path,
331 url_prefix='files/',
331 url_prefix='',
332 332 included_suffixes=None,
333 333 result_html_prefix='',
334 334 result_html_suffix='<br>',
@@ -47,7 +47,7 b' def test_existing_path_FileLink():'
47 47 tf = NamedTemporaryFile()
48 48 fl = display.FileLink(tf.name)
49 49 actual = fl._repr_html_()
50 expected = "<a href='files/%s' target='_blank'>%s</a><br>" % (tf.name,tf.name)
50 expected = "<a href='%s' target='_blank'>%s</a><br>" % (tf.name,tf.name)
51 51 nt.assert_equal(actual,expected)
52 52
53 53 def test_existing_path_FileLink_repr():
@@ -93,9 +93,9 b' def test_existing_path_FileLinks():'
93 93 # the links should always have forward slashes, even on windows, so replace
94 94 # backslashes with forward slashes here
95 95 expected = ["%s/<br>" % td,
96 "&nbsp;&nbsp;<a href='files/%s' target='_blank'>%s</a><br>" %\
96 "&nbsp;&nbsp;<a href='%s' target='_blank'>%s</a><br>" %\
97 97 (tf2.name.replace("\\","/"),split(tf2.name)[1]),
98 "&nbsp;&nbsp;<a href='files/%s' target='_blank'>%s</a><br>" %\
98 "&nbsp;&nbsp;<a href='%s' target='_blank'>%s</a><br>" %\
99 99 (tf1.name.replace("\\","/"),split(tf1.name)[1])]
100 100 expected.sort()
101 101 # We compare the sorted list of links here as that's more reliable
General Comments 0
You need to be logged in to leave comments. Login now