コード例 #1
0
ファイル: test_rss.py プロジェクト: movermeyer/kotti_feed
    def test_rss_basic_site(self):
        from kotti_feed.views import rss_view

        request = DummyRequest()
        rss = rss_view(request.context, request)
        assert rss.content_type == 'application/rss+xml'
        assert '<channel><title>Welcome to Kotti feed</title>' in rss.body
コード例 #2
0
ファイル: test_rss.py プロジェクト: cullerton/kotti_feed
    def test_rss_basic_site(self):
        from kotti_feed.views import rss_view

        request = DummyRequest()
        rss = rss_view(request.context, request)
        assert rss.content_type == 'application/rss+xml'
        assert '<channel><title>Welcome to Kotti feed</title>' in rss.body
コード例 #3
0
ファイル: test_rss.py プロジェクト: movermeyer/kotti_feed
    def test_special_chars_in_feed(self):
        from kotti_feed.views import rss_view
        from kotti.resources import Document, get_root

        root = get_root()
        request = DummyRequest()
        settings()['kotti_feed.content_types'] = 'document image'
        root['doc1'] = Document(title=u'L\xc3\xb6vely Document')
        feed = rss_view(request.context, request)
        assert u'L\xc3\xb6vely Document' in feed.text
        assert u'encoding="utf-8"' in feed.text
コード例 #4
0
ファイル: test_rss.py プロジェクト: cullerton/kotti_feed
    def test_special_chars_in_feed(self):
        from kotti_feed.views import rss_view
        from kotti.resources import Document, get_root

        root = get_root()
        request = DummyRequest()
        settings()['kotti_feed.content_types'] = 'document image'
        root['doc1'] = Document(title=u'L\xc3\xb6vely Document')
        feed = rss_view(request.context, request)
        assert u'L\xc3\xb6vely Document' in feed.text
        assert u'encoding="utf-8"' in feed.text