Skip to content
Snippets Groups Projects
Commit 2986865b authored by James Vasile's avatar James Vasile
Browse files

Put output dir in conf

parent 9d10bd3a
No related branches found
No related tags found
No related merge requests found
import os
import pytest
import psutil
import requests
import subprocess
from xprocess import ProcessStarter
from website import pelicanconf
PORT = 8000
OUTPUT_PATH = os.path.join("../website", pelicanconf.OUTPUT_PATH)
def fetch(url, just_contents=True):
res = requests.get(f'http://localhost:{PORT}/{url}')
......
......@@ -8,7 +8,7 @@ from .conftest import *
def test_uncategorized_suppression(rebuild_site):
"""Tests https://code.librehq.com/ots/ots-blog/-/issues/2"""
cmd = f"grep -crs 'in <a href=\"/category/uncategorized.html\"' ../website/output/ | grep -v ':0$'"
cmd = f"grep -crs 'in <a href=\"/category/uncategorized.html\"' {OUTPUT_PATH} | grep -v ':0$'"
res = subprocess.run(cmd, shell=True)
assert (res.returncode == 1)
return
......@@ -16,7 +16,7 @@ def test_uncategorized_suppression(rebuild_site):
def test_posts_category_suppression(rebuild_site):
"""Tests https://code.librehq.com/ots/ots-blog/-/issues/2 but for Posts
category, which is what we renamed the default category."""
cmd = f"grep -crs 'in <a href=\"/category/posts.html\"' ../website/output/ | grep -v ':0$'"
cmd = f"grep -crs 'in <a href=\"/category/posts.html\"' {OUTPUT_PATH} | grep -v ':0$'"
res = subprocess.run(cmd, shell=True)
assert (res.returncode == 1)
return
......
......@@ -2,6 +2,7 @@ AUTHOR = 'The OTS Team'
SITENAME = 'Open Tech Strategies | Blog'
SITESUBTITLE = 'Maximum return from your open source investments.'
SITEURL = ''
OUTPUT_PATH = "output/"
PATH = 'content'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment