<s> from __future__ import absolute_import <EOL> from xml . etree import ElementTree as ET <EOL> from django . conf import settings <EOL> from django . contrib . comments . models import Comment <EOL> from django . contrib . contenttypes . models import ContentType <EOL> from django . contrib . sites . models import Site <EOL> from . import CommentTestCase <EOL> from . . models import Article <EOL> class CommentFeedTests ( CommentTestCase ) : <EOL> urls = '<STR_LIT>' <EOL> feed_url = '<STR_LIT>' <EOL> def setUp ( self ) : <EOL> site_2 = Site . objects . create ( id = settings . SITE_ID + <NUM_LIT:1> , <EOL> domain = "<STR_LIT>" , name = "<STR_LIT>" ) <EOL> c5 = Comment . objects . create ( <EOL> content_type = ContentType . objects . get_for_model ( Article ) , <EOL> object_pk = "<STR_LIT:1>" , <EOL> user_name = "<STR_LIT>" , <EOL> user_email = "<STR_LIT>" , <EOL> user_url = "<STR_LIT>" , <EOL> comment = "<STR_LIT>" , <EOL> site = site_2 , <EOL> ) <EOL> def test_feed ( self ) : <EOL> response = self . client . get ( self . feed_url ) <EOL> self . assertEqual ( response . status_code , <NUM_LIT:200> ) <EOL> self . assertEqual ( response [ '<STR_LIT:Content-Type>' ] , '<STR_LIT>' ) <EOL> rss_elem = ET . fromstring ( response . content ) <EOL> self . assertEqual ( rss_elem . tag , "<STR_LIT>" ) <EOL> self . assertEqual ( rss_elem . attrib , { "<STR_LIT:version>" : "<STR_LIT>" } ) <EOL> channel_elem = rss_elem . find ( "<STR_LIT>" ) <EOL> title_elem = channel_elem . find ( "<STR_LIT:title>" ) <EOL> self . assertEqual ( title_elem . text , "<STR_LIT>" ) <EOL> link_elem = channel_elem . find ( "<STR_LIT>" ) <EOL> self . assertEqual ( link_elem . text , "<STR_LIT>" ) <EOL> atomlink_elem = channel_elem . find ( "<STR_LIT>" ) <EOL> self . assertEqual ( atomlink_elem . attrib , { "<STR_LIT>" : "<STR_LIT>" , "<STR_LIT>" : "<STR_LIT>" } ) <EOL> self . assertNotContains ( response , "<STR_LIT>" ) </s>
