#NEWLINE# def test_page_user_form_initial( self ) : #NEWLINE# #INDENT# if ( get_user_model ( ) . USERNAME_FIELD == 'email' ) : #NEWLINE# #INDENT# myuser = get_user_model ( ) . objects . create_superuser ( 'myuser' , 'myuser@django-cms.org' , 'myuser@django-cms.org' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# myuser = get_user_model ( ) . objects . create_superuser ( 'myuser' , 'myuser@django-cms.org' , 'myuser' ) #NEWLINE# #UNINDENT# user = create_page_user ( myuser , myuser , grant_all = True ) #NEWLINE# puf = PageUserForm ( instance = user ) #NEWLINE# names = [ 'can_add_page' , 'can_change_page' , 'can_delete_page' , 'can_add_pageuser' , 'can_change_pageuser' , 'can_delete_pageuser' , 'can_add_pagepermission' , 'can_change_pagepermission' , 'can_delete_pagepermission' ] #NEWLINE# for name in names : #NEWLINE# #INDENT# self . assertTrue ( puf . initial . get ( name , False ) )