Skip to content
Permalink
Browse files
slight variation of 1
  • Loading branch information
da2x committed Jun 1, 2015
1 parent 55391f9 commit d15ce706de63e0b83f661dffc492770a7a81d030
Showing 1 changed file with 18 additions and 1 deletion.
@@ -250,7 +250,7 @@ def fill_site(self):
outf.write("foo")

class RedirectionsTest2(EmptyBuildTest):
"""Check REDIRECTS"""
"""Check external REDIRECTS"""

@classmethod
def patch_site(self):
@@ -259,6 +259,23 @@ def patch_site(self):
with io.open(conf_path, "a", encoding="utf8") as outf:
outf.write("""\n\nREDIRECTS = [ ("foo.html", "http://www.example.com/"), ]\n\n""")

class RedirectionsTest3(EmptyBuildTest):
"""Check relative REDIRECTS"""

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

@classmethod
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 io.open(target_path, "w+", encoding="utf8") as outf:
outf.write("foo")

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

0 comments on commit d15ce70

Please sign in to comment.