def _dest_of(self, post): slug = get_post_slug(post, settings.permalink) return os.path.join(g.output_directory, slug_to_destination(slug))
def test_slug_to_destination(): settings.site['prefix'] = '' assert slug_to_destination('a/b.html') == 'a/b.html' assert slug_to_destination('a/b/') == 'a/b.html' assert slug_to_destination('a/b/', True) == 'a/b/index.html' assert slug_to_destination('a/b') == 'a/b.html'
def test_slug_to_destination(): settings.site["prefix"] = "" assert slug_to_destination("a/b.html") == "a/b.html" assert slug_to_destination("a/b/") == "a/b.html" assert slug_to_destination("a/b/", True) == "a/b/index.html" assert slug_to_destination("a/b") == "a/b.html"