Switch to Little boxes, fixes #1 (#8)

This commit is contained in:
Thomas Sileo
2018-06-19 00:10:19 +02:00
committed by GitHub
parent 070e39bdfe
commit 8d5f4a8e98
20 changed files with 1529 additions and 2640 deletions

View File

@@ -9,7 +9,10 @@ from html2text import html2text
def config():
"""Return the current config as a dict."""
import yaml
with open(os.path.join(os.path.dirname(__file__), '..', 'config/me.yml'), 'rb') as f:
with open(
os.path.join(os.path.dirname(__file__), "..", "config/me.yml"), "rb"
) as f:
yield yaml.load(f)
@@ -20,9 +23,9 @@ def resp2plaintext(resp):
def test_ping_homepage(config):
"""Ensure the homepage is accessible."""
resp = requests.get('http://localhost:5005')
resp = requests.get("http://localhost:5005")
resp.raise_for_status()
assert resp.status_code == 200
body = resp2plaintext(resp)
assert config['name'] in body
assert config["name"] in body
assert f"@{config['username']}@{config['domain']}" in body