#NEWLINE# def test_has_write_access_frontend( self ) : #NEWLINE# #INDENT# client = make_logged_in_client ( username = 'write_access_frontend' , groupname = 'write_access_frontend' , is_superuser = False ) #NEWLINE# grant_access ( 'write_access_frontend' , 'write_access_frontend' , 'metastore' ) #NEWLINE# user = User . objects . get ( username = 'write_access_frontend' ) #NEWLINE# def check( client , assertz ) : #NEWLINE# #INDENT# response = client . get ( '/metastore/databases' ) #NEWLINE# assertz ( ( 'Drop</button>' in response . content ) , response . content ) #NEWLINE# assertz ( ( 'Create a new database' in response . content ) , response . content ) #NEWLINE# response = client . get ( '/metastore/tables/' ) #NEWLINE# assertz ( ( 'Drop</button>' in response . content ) , response . content ) #NEWLINE# assertz ( ( 'Create a new table' in response . content ) , response . content ) #NEWLINE# #UNINDENT# check ( client , assert_false ) #NEWLINE# ( group , created ) = Group . objects . get_or_create ( name = 'write_access_frontend' ) #NEWLINE# ( perm , created ) = HuePermission . objects . get_or_create ( app = 'metastore' , action = 'write' ) #NEWLINE# GroupPermission . objects . get_or_create ( group = group , hue_permission = perm ) #NEWLINE# check ( client , assert_true )