Add a (simple) logo
This commit is contained in:
@@ -234,6 +234,7 @@ def test_logout_revokes_token_and_admin_can_list_plugins():
|
||||
def test_public_and_admin_pages_render_html():
|
||||
root_page = client.get('/')
|
||||
assert 'LinkLog' in root_page.text
|
||||
assert 'src="/static/logo.svg"' in root_page.text
|
||||
assert 'class="menu-toggle"' in root_page.text
|
||||
assert 'id="auth-menu" class="auth-menu hidden"' in root_page.text
|
||||
assert 'id="auth-home-link" href="/">Home</a>' in root_page.text
|
||||
@@ -255,6 +256,7 @@ def test_public_and_admin_pages_render_html():
|
||||
assert client.get('/login').status_code == 200
|
||||
login_page = client.get('/login').text
|
||||
assert 'Sign in' in login_page
|
||||
assert 'src="/static/logo.svg"' in login_page
|
||||
assert 'id="auth-session" class="auth-session hidden"' in login_page
|
||||
assert 'logout.js?v=3' in login_page
|
||||
assert client.get('/admin').status_code == 200
|
||||
@@ -300,7 +302,7 @@ def test_link_submission_posts_to_enabled_mastodon_plugin():
|
||||
assert client.put('/api/user/plugins/mastodon', headers=headers, json={
|
||||
'instance': base_url,
|
||||
'access_token': 'test-token',
|
||||
'post_prefix': 'From my #LinkLog: "',
|
||||
'post_prefix': 'From my #LinkLog: ',
|
||||
}).status_code == 200
|
||||
assert client.put('/api/admin/plugins/mastodon', headers=headers, json={'enabled': True}).status_code == 200
|
||||
|
||||
@@ -315,7 +317,7 @@ def test_link_submission_posts_to_enabled_mastodon_plugin():
|
||||
assert received['path'] == '/api/v1/statuses'
|
||||
assert received['authorization'] == 'Bearer test-token'
|
||||
assert received['body'] == {
|
||||
'status': 'A useful page\nWorth sharing\nFrom my #LinkLog: "https://example.com/useful #python #web',
|
||||
'status': 'A useful page\nWorth sharing\nFrom my #LinkLog: https://example.com/useful #python #web',
|
||||
}
|
||||
finally:
|
||||
server.shutdown()
|
||||
@@ -328,12 +330,12 @@ def test_plugin_config_can_be_saved_for_mastodon():
|
||||
assert client.put('/api/user/plugins/mastodon', headers=headers, json={
|
||||
'instance': 'mastodon.social',
|
||||
'access_token': 'demo-token',
|
||||
'post_prefix': 'From my #LinkLog: "',
|
||||
'post_prefix': 'From my #LinkLog: ',
|
||||
}).status_code == 200
|
||||
|
||||
payload = client.get('/api/user/plugins/mastodon', headers=headers).json()
|
||||
assert payload['instance'] == 'mastodon.social'
|
||||
assert payload['post_prefix'] == 'From my #LinkLog: "'
|
||||
assert payload['post_prefix'] == 'From my #LinkLog: '
|
||||
|
||||
admin_update = client.put('/api/admin/plugins/mastodon', headers=headers, json={
|
||||
'enabled': True,
|
||||
|
||||
Reference in New Issue
Block a user