Show More
@@ -267,7 +267,7 b' class FileLink(object):' | |||||
267 |
|
267 | |||
268 | def __init__(self, |
|
268 | def __init__(self, | |
269 | path, |
|
269 | path, | |
270 |
url_prefix=' |
|
270 | url_prefix='', | |
271 | result_html_prefix='', |
|
271 | result_html_prefix='', | |
272 | result_html_suffix='<br>'): |
|
272 | result_html_suffix='<br>'): | |
273 | """ |
|
273 | """ | |
@@ -328,7 +328,7 b' class FileLinks(FileLink):' | |||||
328 | """ |
|
328 | """ | |
329 | def __init__(self, |
|
329 | def __init__(self, | |
330 | path, |
|
330 | path, | |
331 |
url_prefix=' |
|
331 | url_prefix='', | |
332 | included_suffixes=None, |
|
332 | included_suffixes=None, | |
333 | result_html_prefix='', |
|
333 | result_html_prefix='', | |
334 | result_html_suffix='<br>', |
|
334 | result_html_suffix='<br>', |
@@ -47,7 +47,7 b' def test_existing_path_FileLink():' | |||||
47 | tf = NamedTemporaryFile() |
|
47 | tf = NamedTemporaryFile() | |
48 | fl = display.FileLink(tf.name) |
|
48 | fl = display.FileLink(tf.name) | |
49 | actual = fl._repr_html_() |
|
49 | actual = fl._repr_html_() | |
50 |
expected = "<a href=' |
|
50 | expected = "<a href='%s' target='_blank'>%s</a><br>" % (tf.name,tf.name) | |
51 | nt.assert_equal(actual,expected) |
|
51 | nt.assert_equal(actual,expected) | |
52 |
|
52 | |||
53 | def test_existing_path_FileLink_repr(): |
|
53 | def test_existing_path_FileLink_repr(): | |
@@ -93,9 +93,9 b' def test_existing_path_FileLinks():' | |||||
93 | # the links should always have forward slashes, even on windows, so replace |
|
93 | # the links should always have forward slashes, even on windows, so replace | |
94 | # backslashes with forward slashes here |
|
94 | # backslashes with forward slashes here | |
95 | expected = ["%s/<br>" % td, |
|
95 | expected = ["%s/<br>" % td, | |
96 |
" <a href=' |
|
96 | " <a href='%s' target='_blank'>%s</a><br>" %\ | |
97 | (tf2.name.replace("\\","/"),split(tf2.name)[1]), |
|
97 | (tf2.name.replace("\\","/"),split(tf2.name)[1]), | |
98 |
" <a href=' |
|
98 | " <a href='%s' target='_blank'>%s</a><br>" %\ | |
99 | (tf1.name.replace("\\","/"),split(tf1.name)[1])] |
|
99 | (tf1.name.replace("\\","/"),split(tf1.name)[1])] | |
100 | expected.sort() |
|
100 | expected.sort() | |
101 | # We compare the sorted list of links here as that's more reliable |
|
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