#NEWLINE# def test_article_filter( self ) : #NEWLINE# #INDENT# prelease = modelfactories . AheadPressReleaseFactory . create ( ) #NEWLINE# pr_articles = [ ] #NEWLINE# for pr in range ( 5 ) : #NEWLINE# #INDENT# pr_articles . append ( modelfactories . PressReleaseArticleFactory . create ( press_release = prelease ) ) #NEWLINE# #UNINDENT# response = self . app . get ( ( '/api/v2/apressreleases/?article_pid=%s' % pr_articles [ 0 ] . article_pid ) , extra_environ = self . extra_environ ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# self . assertTrue ( ( 'objects' in response . content ) ) #NEWLINE# self . assertEqual ( len ( json . loads ( response . content ) [ 'objects' ] ) , 1 )