#NEWLINE# def test_link_or_page( self ) : #NEWLINE# #INDENT# 'Test a validator: you can enter a url or a page_link, but not both.' #NEWLINE# page_data = self . get_new_page_data ( ) #NEWLINE# self . client . post ( URL_CMS_PAGE_ADD , page_data ) #NEWLINE# page = Page . objects . all ( ) [ 0 ] #NEWLINE# picture = Picture ( url = 'test' ) #NEWLINE# picture . clean ( ) #NEWLINE# picture . page_link = self #NEWLINE# picture . url = None #NEWLINE# picture . clean ( ) #NEWLINE# picture . url = 'test' #NEWLINE# self . assertRaises ( ValidationError , picture . clean )