Skip to content

Commit

Permalink
slight variation of 1
Browse files Browse the repository at this point in the history
  • Loading branch information
da2x committed Jun 1, 2015
1 parent 55391f9 commit d15ce70
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/test_integration.py
Expand Up @@ -250,7 +250,7 @@ def fill_site(self):
outf.write("foo")

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

@classmethod
def patch_site(self):
Expand All @@ -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."""

Expand Down

0 comments on commit d15ce70

Please sign in to comment.