forked from django-fiber/django-fiber
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marco Braak
authored and
Niels van Dijk
committed
Oct 10, 2013
1 parent
70507fd
commit 4814868
Showing
5 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
{% load fiber_tags %} | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>{% block title %}{{ fiber_page.title }}{% endblock %}</title> | ||
</head> | ||
<body> | ||
{% show_page_content "main" %} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from django.test import TestCase | ||
|
||
from fiber.models import Page, ContentItem, PageContentItem | ||
|
||
|
||
class FiberTests(TestCase): | ||
def test_fiber(self): | ||
# setup | ||
frontpage = Page.objects.create(title='frontpage', url='/') | ||
lorem_ipsum = ContentItem.objects.create(content_html='lorem ipsum') | ||
PageContentItem.objects.create(page=frontpage, content_item=lorem_ipsum, block_name='main') | ||
|
||
# - get page | ||
response = self.client.get('/') | ||
self.assertContains(response, 'lorem ipsum') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters