<s> from base import FeedTest <EOL> from lifestream . models import * <EOL> from lifestream . feeds import update_feeds <EOL> class IanLewisFeedTest ( FeedTest ) : <EOL> fixtures = FeedTest . fixtures + [ "<STR_LIT>" ] <EOL> def test_ianlewis_rss ( self ) : <EOL> update_feeds ( ) <EOL> self . assertEqual ( Item . objects . filter ( feed__pk = <NUM_LIT:1> ) . count ( ) , <NUM_LIT:10> ) <EOL> class BitbucketFeedTest ( FeedTest ) : <EOL> fixtures = FeedTest . fixtures + [ "<STR_LIT>" ] <EOL> def test_bitbucket_atom ( self ) : <EOL> update_feeds ( ) <EOL> self . assertEqual ( Item . objects . filter ( feed__pk = <NUM_LIT> ) . count ( ) , <NUM_LIT:15> ) <EOL> def test_bitbucket_rss ( self ) : <EOL> update_feeds ( ) <EOL> self . assertEqual ( Item . objects . filter ( feed__pk = <NUM_LIT> ) . count ( ) , <NUM_LIT:15> ) <EOL> class YoutubeTest ( FeedTest ) : <EOL> fixtures = FeedTest . fixtures + [ "<STR_LIT>" ] <EOL> def test_youtube_atom ( self ) : <EOL> update_feeds ( ) <EOL> youtube_items = list ( Item . objects . filter ( feed__pk = <NUM_LIT> ) ) <EOL> self . assertEqual ( len ( youtube_items ) , <NUM_LIT> ) <EOL> for item in youtube_items : <EOL> self . assertTrue ( item . media_url , '<STR_LIT>' % item . title ) <EOL> self . assertTrue ( item . media_thumbnail_url , '<STR_LIT>' % item . title ) <EOL> self . assertTrue ( item . media_player_url , '<STR_LIT>' % item . title ) <EOL> self . assertTrue ( item . media_description , '<STR_LIT>' % item . title ) <EOL> self . assertTrue ( item . media_description_type ) <EOL> class DeliciousTest ( FeedTest ) : <EOL> fixtures = FeedTest . fixtures + [ "<STR_LIT>" ] <EOL> def test_delicious_top_rss ( self ) : <EOL> update_feeds ( ) <EOL> self . assertEqual ( Item . objects . filter ( feed__pk = <NUM_LIT> ) . count ( ) , <NUM_LIT:15> ) <EOL> def test_delicious_user_rss ( self ) : <EOL> update_feeds ( ) <EOL> self . assertEqual ( Item . objects . filter ( feed__pk = <NUM_LIT> ) . count ( ) , <NUM_LIT:15> ) <EOL> class TwitterTest ( FeedTest ) : <EOL> fixtures = FeedTest . fixtures + [ "<STR_LIT>" ] <EOL> def test_twitter_user_rss ( self ) : <EOL> update_feeds ( ) <EOL> self . assertEqual ( Item . objects . filter ( feed__pk = <NUM_LIT> ) . count ( ) , <NUM_LIT:20> ) <EOL> class BloggerTest ( FeedTest ) : <EOL> fixtures = FeedTest . fixtures + [ "<STR_LIT>" ] <EOL> def test_blogger_blog_atom ( self ) : <EOL> update_feeds ( ) <EOL> self . assertEqual ( Item . objects . filter ( feed__pk = <NUM_LIT> ) . count ( ) , <NUM_LIT> ) <EOL> def test_blogger_blog_rss ( self ) : <EOL> update_feeds ( ) <EOL> self . assertEqual ( Item . objects . filter ( feed__pk = <NUM_LIT> ) . count ( ) , <NUM_LIT> ) <EOL> class RegressionFeedTest ( FeedTest ) : <EOL> fixtures = FeedTest . fixtures + [ "<STR_LIT>" ] <EOL> def assertNotEmpty ( self , v ) : <EOL> self . assertNotEqual ( v , None ) <EOL> self . assertNotEqual ( v , "<STR_LIT>" ) <EOL> def test_content ( self ) : <EOL> update_feeds ( ) <EOL> for item in Item . objects . filter ( feed__pk = <NUM_LIT> ) : <EOL> self . assertNotEmpty ( item . content ) <EOL> self . assertNotEmpty ( item . clean_content ) </s>
