Skip to content
Browse files
added test for redirect
  • Loading branch information
ralsina committed Jun 1, 2015
1 parent 19a9085 commit 9e8ed2d8d446dcae0cb9dcde715407be04d4d20d
Showing 1 changed file with 18 additions and 0 deletions.
@@ -232,6 +232,24 @@ def patch_site(self):

class RedirectionsTest1(EmptyBuildTest):
"""Check REDIRECTS"""

def patch_site(self):
conf_path = os.path.join(self.target_dir, "")
with, "a", encoding="utf8") as outf:
outf.write("""\n\nREDIRECTS = [ ("posts/foo.html", "/foo/bar.html"), ]\n\n""")

def fill_site(self):
target_path = os.path.join(self.target_dir, "files", "foo", "bar.html")
nikola.utils.makedirs(os.path.join(self.target_dir, "files", "foo"))
with, "w+", encoding="utf8") as outf:

class MissingDefaultLanguageTest(TranslatedBuildTest):
"""Make sure posts only in secondary languages work."""

0 comments on commit 9e8ed2d

Please sign in to comment.