#NEWLINE# def test_no_location_or_file( self ) : #NEWLINE# #INDENT# 'The form will not be valid if both copy_from and image_file are not\n        provided.\n        ' #NEWLINE# post = { #NEWLINE# #INDENT# 'name' : 'Ubuntu 11.10' , #NEWLINE# 'source_type' : 'file' , #NEWLINE# 'description' : 'Login with admin/admin' , #NEWLINE# 'disk_format' : 'qcow2' , #NEWLINE# 'architecture' : 'x86-64' , #NEWLINE# 'minimum_disk' : 15 , #NEWLINE# 'minimum_ram' : 512 , #NEWLINE# 'is_public' : 1 , #NEWLINE# #UNINDENT# } #NEWLINE# files = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# form = forms . CreateImageForm ( form , files ) #NEWLINE# self . assertEqual ( form . is_valid ( ) , False )