Ejemplo n.º 1
0
 def _dest_of(self, post):
     slug = get_post_slug(post, settings.permalink)
     return os.path.join(g.output_directory, slug_to_destination(slug))
Ejemplo n.º 2
0
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'
Ejemplo n.º 3
0
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"