#NEWLINE# def test_editable_pages_for_inactive_user( self ) : #NEWLINE# #INDENT# user = get_user_model ( ) . objects . get ( username = 'inactiveuser' ) #NEWLINE# homepage = Page . objects . get ( url_path = '/home/' ) #NEWLINE# christmas_page = EventPage . objects . get ( url_path = '/home/events/christmas/' ) #NEWLINE# unpublished_event_page = EventPage . objects . get ( url_path = '/home/events/tentative-unpublished-event/' ) #NEWLINE# someone_elses_event_page = EventPage . objects . get ( url_path = '/home/events/someone-elses-event/' ) #NEWLINE# user_perms = UserPagePermissionsProxy ( user ) #NEWLINE# editable_pages = user_perms . editable_pages ( ) #NEWLINE# can_edit_pages = user_perms . can_edit_pages ( ) #NEWLINE# publishable_pages = user_perms . publishable_pages ( ) #NEWLINE# can_publish_pages = user_perms . can_publish_pages ( ) #NEWLINE# self . assertFalse ( editable_pages . filter ( id = homepage . id ) . exists ( ) ) #NEWLINE# self . assertFalse ( editable_pages . filter ( id = christmas_page . id ) . exists ( ) ) #NEWLINE# self . assertFalse ( editable_pages . filter ( id = unpublished_event_page . id ) . exists ( ) ) #NEWLINE# self . assertFalse ( editable_pages . filter ( id = someone_elses_event_page . id ) . exists ( ) ) #NEWLINE# self . assertFalse ( can_edit_pages ) #NEWLINE# self . assertFalse ( publishable_pages . filter ( id = homepage . id ) . exists ( ) ) #NEWLINE# self . assertFalse ( publishable_pages . filter ( id = christmas_page . id ) . exists ( ) ) #NEWLINE# self . assertFalse ( publishable_pages . filter ( id = unpublished_event_page . id ) . exists ( ) ) #NEWLINE# self . assertFalse ( publishable_pages . filter ( id = someone_elses_event_page . id ) . exists ( ) ) #NEWLINE# self . assertFalse ( can_publish_pages )