allow overriding the "incorporeal.org" in <title>

I'm not going to be able to use this software on incorporeal.org for a
bit, so plan B
This commit is contained in:
2020-03-07 19:43:24 -06:00
parent ab009e4f59
commit 337001a939
3 changed files with 13 additions and 1 deletions

View File

@@ -11,3 +11,13 @@ def test_config():
instance_path = os.path.join(HERE, 'instance')
assert not create_app(instance_path=instance_path).testing
assert create_app(instance_path=instance_path, test_config={"TESTING": True}).testing
def test_title_override():
"""Test that a configuration with a specific title overrides the default."""
instance_path = os.path.join(HERE, 'instance')
app = create_app(instance_path=instance_path, test_config={'TITLE_SUFFIX': 'suou.net'})
client = app.test_client()
response = client.get('/no-title')
assert response.status_code == 200
assert b'<title>suou.net</title>' in response.data