Show More
@@ -14,7 +14,7 b'' | |||||
14 | #----------------------------------------------------------------------------- |
|
14 | #----------------------------------------------------------------------------- | |
15 | from __future__ import print_function |
|
15 | from __future__ import print_function | |
16 | from tempfile import NamedTemporaryFile, mkdtemp |
|
16 | from tempfile import NamedTemporaryFile, mkdtemp | |
17 |
|
17 | from os.path import split | ||
18 |
|
18 | |||
19 | # Third-party imports |
|
19 | # Third-party imports | |
20 | import nose.tools as nt |
|
20 | import nose.tools as nt | |
@@ -77,8 +77,8 b' def test_existing_path_FileLinks():' | |||||
77 | actual = fl._repr_html_() |
|
77 | actual = fl._repr_html_() | |
78 | actual = actual.split('\n') |
|
78 | actual = actual.split('\n') | |
79 | actual.sort() |
|
79 | actual.sort() | |
80 | expected = ["<a href='files/%s' target='_blank'>%s</a><br>" % (tf2.name,tf2.name), |
|
80 | expected = ["<a href='files/%s' target='_blank'>%s</a><br>" % (tf2.name,split(tf2.name)[1]), | |
81 | "<a href='files/%s' target='_blank'>%s</a><br>" % (tf1.name,tf1.name)] |
|
81 | "<a href='files/%s' target='_blank'>%s</a><br>" % (tf1.name,split(tf1.name)[1])] | |
82 | expected.sort() |
|
82 | expected.sort() | |
83 | # We compare the sorted list of links here as that's more reliable |
|
83 | # We compare the sorted list of links here as that's more reliable | |
84 | nt.assert_equal(actual,expected) |
|
84 | nt.assert_equal(actual,expected) | |
@@ -110,7 +110,7 b' def test_warning_on_non_existant_path_DirectoryLink():' | |||||
110 | dl = display.DirectoryLink('example') |
|
110 | dl = display.DirectoryLink('example') | |
111 | nt.assert_true(dl._repr_html_().startswith('Path (<tt>example</tt>)')) |
|
111 | nt.assert_true(dl._repr_html_().startswith('Path (<tt>example</tt>)')) | |
112 |
|
112 | |||
113 |
def test_existing_path_ |
|
113 | def test_existing_path_DirectoryLink(): | |
114 | """ Calling _repr_html_ functions as expected on existing directory """ |
|
114 | """ Calling _repr_html_ functions as expected on existing directory """ | |
115 | td = mkdtemp() |
|
115 | td = mkdtemp() | |
116 | dl = display.DirectoryLink(td) |
|
116 | dl = display.DirectoryLink(td) |
General Comments 0
You need to be logged in to leave comments.
Login now