예제 #1
0
파일: core.py 프로젝트: msabramo/liquidluck
 def _dest_of(self, post):
     slug = get_post_slug(post, settings.permalink)
     return os.path.join(g.output_directory, slug_to_destination(slug))
예제 #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'
예제 #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"