#NEWLINE# def test_get_export_file( self ) : #NEWLINE# #INDENT# export_file = get_export_file ( [ CaseExportInstance ( export_format = Format . JSON , domain = DOMAIN , case_type = DEFAULT_CASE_TYPE , tables = [ TableConfiguration ( label = 'My table' , selected = True , path = [ ] , columns = [ ExportColumn ( label = 'Foo column' , item = ExportItem ( path = [ PathNode ( name = 'foo' ) ] ) , selected = True ) , ExportColumn ( label = 'Bar column' , item = ExportItem ( path = [ PathNode ( name = 'bar' ) ] ) , selected = True ) ] ) ] ) ] , [ ] ) #NEWLINE# with export_file as export : #NEWLINE# #INDENT# self . assertEqual ( json . loads ( export ) , { #NEWLINE# #INDENT# 'My table' : { #NEWLINE# #INDENT# 'headers' : [ 'Foo column' , 'Bar column' ] , #NEWLINE# 'rows' : [ [ 'apple' , 'banana' ] , [ 'apple' , 'banana' ] , [ 'apple' , 'banana' ] ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } )