#NEWLINE# @ raises ( FileTypeError ) #NEWLINE# def test_create_not_supported( self ) : #NEWLINE# #INDENT# xyz_file = StringIO ( ) #NEWLINE# xyz = Image . new ( 'RGBA' , size = ( 50 , 50 ) , color = ( 256 , 0 , 0 ) ) #NEWLINE# xyz . save ( xyz_file , 'png' ) #NEWLINE# xyz_file . seek ( 0 ) #NEWLINE# the_file = ContentFile ( xyz_file . read ( ) , 'test.xyz' ) #NEWLINE# the_file . content_type = 'chemical/x-xyz' #NEWLINE# MediaFile . objects . create ( name = 'Test name' , description = 'Test Description' , contribution = ObservationFactory . create ( ) , creator = UserFactory . create ( ) , the_file = xyz )