##// END OF EJS Templates
Add tests for filter
Peter Davis -
Show More
@@ -42,4 +42,19 b' class TestLatex(TestsBase):'
42 """Try to remove latex from string"""
42 """Try to remove latex from string"""
43 self.assertEqual(escape_latex(test), result)
43 self.assertEqual(escape_latex(test), result)
44
44
45 def test_strip_url_static_file_prefix(self):
46 tests = [
47 ('hello!', 'hello!'),
48 ('hello![caption]', 'hello![caption]'),
49 ('hello![caption](/url/location.gif)', 'hello![caption](/url/location.gif)'),
50 ('hello![caption](url/location.gif)', 'hello![caption](url/location.gif)'),
51 ('hello![caption](url/location.gif)', 'hello![caption](url/location.gif)'),
52 ('hello![caption](files/url/location.gif)', 'hello![caption](url/location.gif)'),
53 ('hello![caption](/files/url/location.gif)', 'hello![caption](url/location.gif)'),
54 ]
55
56 for test in tests:
57 self._test_strip_url_static_file_prefix(test[0], test[1])
45
58
59 def _test_strip_url_static_file_prefix(self, test, result):
60 self.assertEqual(strip_url_static_file_prefix(test), result)
General Comments 0
You need to be logged in to leave comments. Login now