Beispiel #1
0
    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
Beispiel #2
0
    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
Beispiel #3
0
    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
Beispiel #4
0
    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