mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
add support for relative cross-site links
This commit is contained in:
parent
a6dd3178b1
commit
a0504aeabe
7 changed files with 26 additions and 19 deletions
|
|
@ -19,6 +19,9 @@ class TestPage(unittest.TestCase):
|
|||
super(TestPage, self).setUp()
|
||||
self.page_kwargs = {
|
||||
'content': TEST_CONTENT,
|
||||
'context': {
|
||||
'localsiteurl': '',
|
||||
},
|
||||
'metadata': {
|
||||
'summary': TEST_SUMMARY,
|
||||
'title': 'foo bar',
|
||||
|
|
@ -32,7 +35,8 @@ class TestPage(unittest.TestCase):
|
|||
|
||||
"""
|
||||
metadata = {'foo': 'bar', 'foobar': 'baz', 'title': 'foobar', }
|
||||
page = Page(TEST_CONTENT, metadata=metadata)
|
||||
page = Page(TEST_CONTENT, metadata=metadata,
|
||||
context={'localsiteurl': ''})
|
||||
for key, value in metadata.items():
|
||||
self.assertTrue(hasattr(page, key))
|
||||
self.assertEqual(value, getattr(page, key))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue