diff options
| author | 2014-02-28 08:49:41 -0300 | |
|---|---|---|
| committer | 2014-02-28 08:49:41 -0300 | |
| commit | 0f1e24f7888ba16fe5629c57fd00f0deacb63e5e (patch) | |
| tree | 7153a3a11b766f375b1d1c0a7adc599e0a9f9c55 /tests/test_rss_feeds.py | |
| parent | 04fc43563d3d5d4218004690b5e14c19c67bdcbc (diff) | |
| parent | 2828399ba5cbb14502b023d4de1ba02f13dd5055 (diff) | |
Merge tag 'upstream/6.3.0'
Upstream version 6.3.0
Diffstat (limited to 'tests/test_rss_feeds.py')
| -rw-r--r-- | tests/test_rss_feeds.py | 19 |
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() |
