aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_rss_feeds.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2014-02-28 08:49:38 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2014-02-28 08:49:38 -0300
commit2828399ba5cbb14502b023d4de1ba02f13dd5055 (patch)
tree38012b6bacaa508ca56fb6f4ba87b912bb54b8c9 /tests/test_rss_feeds.py
parentca94afc07df55cb7fc6fe3b4f3011877b7881195 (diff)
Imported Upstream version 6.3.0upstream/6.3.0
Diffstat (limited to 'tests/test_rss_feeds.py')
-rw-r--r--tests/test_rss_feeds.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/test_rss_feeds.py b/tests/test_rss_feeds.py
index 169e1e7..d1404d8 100644
--- a/tests/test_rss_feeds.py
+++ b/tests/test_rss_feeds.py
@@ -1,6 +1,14 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
+
+# This code is so you can run the samples without installing the package,
+# and should be before any import touching nikola, in any file under tests/
+import os
+import sys
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
+
+
from collections import defaultdict
from io import StringIO
import os
@@ -9,18 +17,23 @@ import unittest
import mock
-from .context import nikola # NOQA
from lxml import etree
from .base import LocaleSupportInTesting
+import nikola
fake_conf = defaultdict(str)
-fake_conf['TIMEZONE'] = None
+fake_conf['TIMEZONE'] = 'UTC'
fake_conf['DEFAULT_LANG'] = 'en'
fake_conf['TRANSLATIONS'] = {'en': ''}
fake_conf['BASE_URL'] = 'http://some.blog/'
+class FakeCompiler(object):
+ demote_headers = False
+ compile_html = None
+
+
class RSSFeedTest(unittest.TestCase):
def setUp(self):
LocaleSupportInTesting.initialize_locales_for_testing('unilingual')
@@ -46,7 +59,7 @@ class RSSFeedTest(unittest.TestCase):
True,
{'en': ''},
'post.tmpl',
- lambda *a: None)
+ FakeCompiler())
opener_mock = mock.mock_open()