Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed May 17, 2017
1 parent 1ddc449 commit b9f10aa
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/test_integration.py
Expand Up @@ -392,10 +392,10 @@ def patch_site(self):
conf_path = os.path.join(self.target_dir, "conf.py")
with io.open(conf_path, "r", encoding="utf-8") as inf:
data = inf.read()
data = data.replace('("pages/*.txt", "pages", "story.tmpl"),',
'("pages/*.txt", "", "story.tmpl"),')
data = data.replace('("pages/*.rst", "pages", "story.tmpl"),',
'("pages/*.rst", "", "story.tmpl"),')
data = data.replace('("pages/*.txt", "pages", "page.tmpl"),',
'("pages/*.txt", "", "page.tmpl"),')
data = data.replace('("pages/*.rst", "pages", "page.tmpl"),',
'("pages/*.rst", "", "page.tmpl"),')
data = data.replace('# INDEX_PATH = ""',
'INDEX_PATH = "blog"')
with io.open(conf_path, "w+", encoding="utf8") as outf:
Expand Down Expand Up @@ -553,7 +553,7 @@ def patch_site(self):
"""Enable post sections."""
conf_path = os.path.join(self.target_dir, "conf.py")
with io.open(conf_path, "a", encoding="utf8") as outf:
outf.write("""\n\nPOSTS_SECTIONS = True\nPOSTS_SECTIONS_ARE_INDEXES = True\nPRETTY_URLS = True\nPOSTS = (('posts/*.txt', '', 'post.tmpl'),)\nPAGES = (('pages/*.txt', '', 'story.tmpl'),)\n\n""")
outf.write("""\n\nPOSTS_SECTIONS = True\nPOSTS_SECTIONS_ARE_INDEXES = True\nPRETTY_URLS = True\nPOSTS = (('posts/*.txt', '', 'post.tmpl'),)\nPAGES = (('pages/*.txt', '', 'page.tmpl'),)\n\n""")

@classmethod
def fill_site(self):
Expand Down Expand Up @@ -602,7 +602,7 @@ def patch_site(self):
"""Enable PAGE_INDEX."""
conf_path = os.path.join(self.target_dir, "conf.py")
with io.open(conf_path, "a", encoding="utf8") as outf:
outf.write("""\n\nPAGE_INDEX = True\nPRETTY_URLS = False\nPAGES = PAGES + (('pages/*.php', 'pages', 'story.tmpl'),)\n\n""")
outf.write("""\n\nPAGE_INDEX = True\nPRETTY_URLS = False\nPAGES = PAGES + (('pages/*.php', 'pages', 'page.tmpl'),)\n\n""")

@classmethod
def fill_site(self):
Expand Down Expand Up @@ -707,7 +707,7 @@ def patch_site(self):
"""Enable PAGE_INDEX."""
conf_path = os.path.join(self.target_dir, "conf.py")
with io.open(conf_path, "a", encoding="utf8") as outf:
outf.write("""\n\nPAGE_INDEX = True\nPRETTY_URLS = True\nPAGES = PAGES + (('pages/*.php', 'pages', 'story.tmpl'),)\n\n""")
outf.write("""\n\nPAGE_INDEX = True\nPRETTY_URLS = True\nPAGES = PAGES + (('pages/*.php', 'pages', 'page.tmpl'),)\n\n""")

def _make_output_path(self, dir, name):
"""Make a file path to the output."""
Expand Down

0 comments on commit b9f10aa

Please sign in to comment.