Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad Str attr Assign NameStore Dict Str Str Assign NameStore Dict Str Call NameLoad Str NameLoad Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
Tests for file field behavior, and specifically #639, in which Model.save()
gets called *again* for each FileField. This test will fail if calling a
ModelForm's save() method causes Model.save() to be called more than once.
 N/A os N/A shutil django.core.files.uploadedfile SimpleUploadedFile django.utils unittest regressiontests.bug639.models Photo PhotoForm temp_storage_dir Bug639Test N/A N/A unittest TestCase N/A testBug639 N/A N/A self N/A N/A N/A 
        Simulate a file upload and check how many times Model.save() gets
        called.
         N/A filename N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ test.jpg N/A img N/A N/A N/A open filename rb read N/A data N/A title Testing N/A files N/A image N/A SimpleUploadedFile test.jpg img image/jpeg N/A form N/A PhotoForm data data files files N/A p N/A N/A form save N/A N/A N/A self assertEqual N/A p _savecount 1 N/A tearDown N/A N/A self N/A N/A N/A 
        Make sure to delete the "uploaded" file to avoid clogging /tmp.
         N/A p N/A N/A N/A Photo objects get N/A N/A N/A N/A p image delete save False N/A N/A N/A shutil rmtree temp_storage_dir N/A N/A