Skip to content

Commit

Permalink
Fix unittest for 7d56df3
Browse files Browse the repository at this point in the history
  • Loading branch information
tankywoo committed May 15, 2017
1 parent 25af9ca commit deef494
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion simiki/server.py
Expand Up @@ -62,7 +62,7 @@ def translate_path(self, path):
_url_root = urllib_request.unquote(URL_ROOT) \
.decode('utf-8').encode(fsenc)
fspath = os.path.join(
PUBLIC_DIRECTORY.encode(fsenc), path[len(_url_root)+1:])
PUBLIC_DIRECTORY.encode(fsenc), path[len(_url_root) + 1:])
return fspath
else:
return http_server.SimpleHTTPRequestHandler \
Expand Down
5 changes: 3 additions & 2 deletions tests/test_generators.py
Expand Up @@ -110,8 +110,9 @@ def test_to_html(self):
self.wiki_path)
html = html_generator_generator.to_html(src_file).strip()
# trip page updated and site generated paragraph
html = re.sub('(?sm)\\n\s*<span class="updated">Updated.*?<\/span>',
'', html)
html = re.sub(
'(?sm)\\n\s*<span class="updated">Page Updated.*?<\/span>',
'', html)
html = re.sub('(?m)^\s*<p>Site Generated .*?<\/p>$\n', '', html)
expected_output = os.path.join(self.wiki_path, 'expected_output.html')
fd = open(expected_output, "rb")
Expand Down

0 comments on commit deef494

Please sign in to comment.