Commit 17de8728 authored by Pierre-Yves Chibon's avatar Pierre-Yves Chibon

Add unit-tests to test viewing a file with a non-ascii name

parent 3c6ab699
......@@ -1371,6 +1371,21 @@ class PagureFlaskRepotests(tests.Modeltests):
output ='/test/blob/master/f/folder1/testfoo.jpg')
self.assertEqual(output.status_code, 404)
# View file with a non-ascii name
os.path.join(tests.HERE, 'test.git'),
ncommits=1, filename='Šource')
output ='/test/blob/master/f/Šource')
self.assertEqual(output.status_code, 200)
self.assertIn('</span>&nbsp; Šource',
self.assertIn('<table class="code_table">',
'<tr><td class="cell1"><a id="_1" href="#_1" '
'<td class="cell2"><pre><span></span>Row 0</pre></td>',
# Add a fork of a fork
item = pagure.lib.model.Project(
user_id=1, # pingou
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment